1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* vm_core.h (struct rb_iseq_t): add a new field line_no. This field

represents line number from which the original code of the iseq
  starts.  [ruby-dev:38698]

* iseq.c, compile.c: ditto.

* parse.y: line number hack (for Proc#source_location) is no longer
  needed.

* test/ruby/test_settracefunc.rb: line number of set_trace_func is now
  compatible with 1.8's.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2009-07-22 13:37:26 +00:00
parent 506a9821ce
commit 31c561f66a
6 changed files with 64 additions and 51 deletions

View file

@ -68,7 +68,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
events.shift)
assert_equal(["c-return", 5, :+, Fixnum],
events.shift)
assert_equal(["return", 4, :add, self.class],
assert_equal(["return", 6, :add, self.class],
events.shift)
assert_equal(["line", 8, __method__, self.class],
events.shift)
@ -98,7 +98,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
events.shift)
assert_equal(["c-return", 4, :inherited, Class],
events.shift)
assert_equal(["class", 7, nil, nil],
assert_equal(["class", 4, nil, nil],
events.shift)
assert_equal(["line", 5, nil, nil],
events.shift)
@ -120,7 +120,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
events.shift)
assert_equal(["call", 5, :bar, Foo],
events.shift)
assert_equal(["return", 5, :bar, Foo],
assert_equal(["return", 6, :bar, Foo],
events.shift)
assert_equal(["line", 9, __method__, self.class],
events.shift)