Skip to content

Commit 651b7db

Browse files
committed
undoing weird change
1 parent c74b954 commit 651b7db

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

‎test/ruby/test_pack.rb‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,20 +1007,6 @@ class Array
10071007
end;
10081008
end
10091009

1010-
def test_pack_modify_buffer_r_R
1011-
buf = "x" * 10_000
1012-
o = Object.new
1013-
o.define_singleton_method(:to_int) { buf.clear; 1 }
1014-
[o, 42].pack("R R", buffer: buf)
1015-
assert_equal "\x01\x2A".b, buf
1016-
1017-
buf = "x" * 10_000
1018-
o = Object.new
1019-
o.define_singleton_method(:to_int) { buf.clear; -2 }
1020-
[o].pack("r", buffer: buf)
1021-
assert_equal "\x7E".b, buf
1022-
end
1023-
10241010
def test_unpack_broken_R
10251011
assert_equal([nil], "\xFF".unpack("R"))
10261012
assert_nil("\xFF".unpack1("R"))

0 commit comments

Comments
 (0)