File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def last_line
8282 def first_line
8383 self . to_a [ 4 ] [ :code_location ] [ 0 ]
8484 end unless method_defined? ( :first_line )
85- end
85+ end if defined? ( RubyVM :: InstructionSequence )
8686
8787module DEBUGGER__
8888 PresetCommands = Struct . new ( :commands , :source , :auto_continue )
@@ -133,7 +133,7 @@ def initialize
133133 @commands = { }
134134 @unsafe_context = false
135135
136- @has_keep_script_lines = RubyVM . respond_to? : keep_script_lines
136+ @has_keep_script_lines = defined? ( RubyVM . keep_script_lines )
137137
138138 @tp_load_script = TracePoint . new ( :script_compiled ) { |tp |
139139 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
2222 end
2323 end
2424
25- if RubyVM . respond_to? : keep_script_lines
25+ if defined? ( RubyVM . keep_script_lines )
2626 # Ruby 3.1 and later
2727 RubyVM . keep_script_lines = true
2828 require 'objspace'
You can’t perform that action at this time.
0 commit comments