File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def last_line
82
82
def first_line
83
83
self . to_a [ 4 ] [ :code_location ] [ 0 ]
84
84
end unless method_defined? ( :first_line )
85
- end
85
+ end if defined? ( RubyVM :: InstructionSequence )
86
86
87
87
module DEBUGGER__
88
88
PresetCommands = Struct . new ( :commands , :source , :auto_continue )
@@ -133,7 +133,7 @@ def initialize
133
133
@commands = { }
134
134
@unsafe_context = false
135
135
136
- @has_keep_script_lines = RubyVM . respond_to? : keep_script_lines
136
+ @has_keep_script_lines = defined? ( RubyVM . keep_script_lines )
137
137
138
138
@tp_load_script = TracePoint . new ( :script_compiled ) { |tp |
139
139
eval_script = tp . eval_script unless @has_keep_script_lines
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def get iseq
22
22
end
23
23
end
24
24
25
- if RubyVM . respond_to? : keep_script_lines
25
+ if defined? ( RubyVM . keep_script_lines )
26
26
# Ruby 3.1 and later
27
27
RubyVM . keep_script_lines = true
28
28
require 'objspace'
You can’t perform that action at this time.
0 commit comments