Sha256: 4cd165ed036bd13b515bb02f588b900a3ba8c663873853a24d8e42df65224e88
Contents?: true
Size: 578 Bytes
Versions: 2
Compression:
Stored size: 578 Bytes
Contents
# Some simple tests of RubyVM::InstructionSequence#disasm, and # #disasm_nochildren require 'test/unit' class TestDisasmClass < Test::Unit::TestCase def test_basic assert_equal(RubyVM::InstructionSequence.compile('1+2').disassemble, RubyVM::InstructionSequence.compile('1+2').disasm) p='def five; 5 end; five' s1=RubyVM::InstructionSequence.compile(p).disasm assert_equal String, s1.class, 'disasm output should be a string' s2=RubyVM::InstructionSequence.compile(p).disasm_nochildren assert_equal true, s1.size > s2.size end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rb-threadframe-0.39 | test/ruby/test_disasm.rb |
rb-threadframe-0.37 | test/ruby/test_disasm.rb |