File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
activesupport/lib/active_support Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def backtrace_locations
45
45
46
46
private
47
47
def parse_message_for_trace
48
- if source_location_eval?
48
+ if __getobj__ . to_s . start_with? ( "(eval" )
49
49
# If the exception is coming from a call to eval, we need to keep
50
50
# the path of the file in which eval was called to ensure we can
51
51
# return the right source fragment to show the location of the
@@ -56,15 +56,5 @@ def parse_message_for_trace
56
56
__getobj__ . to_s . split ( "\n " )
57
57
end
58
58
end
59
-
60
- if SyntaxError . method_defined? ( :path ) # Ruby 3.3+
61
- def source_location_eval?
62
- __getobj__ . path . start_with? ( "(eval" )
63
- end
64
- else # 3.2 and older versions of Ruby
65
- def source_location_eval?
66
- __getobj__ . to_s . start_with? ( "(eval" )
67
- end
68
- end
69
59
end
70
60
end
You can’t perform that action at this time.
0 commit comments