From e72ae8cc0fe471b5426c7babbcf8f7191f3b6d48 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 14 Jan 2012 12:56:46 +0000 Subject: * iseq.c (iseq_data_to_ary): check line info table boundary. line number 0 means no line number info is needed. [ruby-dev:45130] [Bug #5894] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_iseq.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/ruby/test_iseq.rb (limited to 'test/ruby/test_iseq.rb') diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb new file mode 100644 index 0000000000..2b25630e57 --- /dev/null +++ b/test/ruby/test_iseq.rb @@ -0,0 +1,11 @@ +require 'test/unit' +require_relative 'envutil' + +class TestISeq < Test::Unit::TestCase + ISeq = RubyVM::InstructionSequence + + def test_no_linenum + bug5894 = '[ruby-dev:45130]' + assert_normal_exit('p RubyVM::InstructionSequence.compile("1", "mac", "", 0).to_a', bug5894) + end +end -- cgit v1.2.3