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

Adjust caller's line number, expect the next line as here-doc

This commit is contained in:
Nobuyoshi Nakada 2019-06-29 01:30:43 +09:00
parent 2bb217bfb7
commit d12d53a6c8
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -272,7 +272,7 @@ class TestRubyOptimization < Test::Unit::TestCase
unless file
loc, = caller_locations(1, 1)
file = loc.path
line ||= loc.lineno
line ||= loc.lineno + 1
end
RubyVM::InstructionSequence.new("proc {|_|_.class_eval {#{src}}}",
file, (path || file), line,