diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_iseq.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 4c811611ba..1a45778cc4 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -398,10 +398,9 @@ class TestISeq < Test::Unit::TestCase def test_to_binary_with_objects code = "[]"+100.times.map{|i|"<</#{i}/"}.join - bin = assert_nothing_raised { - RubyVM::InstructionSequence.compile(code).to_binary - } - # load_from_binary doesn't work now - assert_instance_of(String, bin) + iseq = RubyVM::InstructionSequence.compile(code) + bin = assert_nothing_raised {iseq.to_binary} + iseq2 = RubyVM::InstructionSequence.load_from_binary(bin) + assert_equal(iseq2.to_a, iseq.to_a) end end |
