File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed
src/main/ruby/truffleruby/core Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 33
33
34
34
describe "for a proc created with UnboundMethod#to_proc" do
35
35
it "returns a description including '(lambda)' and optionally including file and line number" do
36
- def hello ; end
37
- method ( "hello" ) . to_proc . send ( @method ) . should =~ /^#<Proc:([^ ]*?)(#{ sep } #{ Regexp . escape __FILE__ } :#{ __LINE__ } )? \( lambda\) >$/
36
+ def hello ; end
37
+ s = method ( "hello" ) . to_proc . send ( @method )
38
+ if s . include? __FILE__
39
+ s . should =~ /^#<Proc:([^ ]*?)#{ sep } #{ Regexp . escape __FILE__ } :#{ __LINE__ - 3 } \( lambda\) >$/
40
+ else
41
+ s . should =~ /^#<Proc:([^ ]*?) \( lambda\) >$/
42
+ end
38
43
end
39
44
40
45
it "has a binary encoding" do
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ def to_s
93
93
if sym = Primitive . proc_symbol_to_proc_symbol ( self )
94
94
suffix << "(&#{ sym . inspect } )"
95
95
elsif file and line
96
- suffix << "@ #{ file } :#{ line } "
96
+ suffix << " #{ file } :#{ line } "
97
97
end
98
98
suffix << ' (lambda)' if lambda?
99
99
base . b . insert ( -2 , suffix )
You can’t perform that action at this time.
0 commit comments