Skip to content

Commit cd6c964

Browse files
committed
RUBY-28068 use __send__ instead of send
1 parent ecccbb3 commit cd6c964

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/ruby-debug-ide/thread_alias.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def do_thread_alias
88
end
99

1010
Object.const_set :OldThread, ::Thread
11-
Object.send :remove_const, :Thread
11+
Object.__send__ :remove_const, :Thread
1212
Object.const_set :Thread, ::Debugger::DebugThread
1313
end
1414

@@ -18,9 +18,9 @@ def undo_thread_alias
1818
return
1919
end
2020

21-
Object.send :remove_const, :Thread
21+
Object.__send__ :remove_const, :Thread
2222
Object.const_set :Thread, ::OldThread
23-
Object.send :remove_const, :OldThread
23+
Object.__send__ :remove_const, :OldThread
2424
end
2525
end
2626
end

lib/ruby-debug-ide/xml_printer.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,13 @@ def exec_with_timeout(sec, error_message)
208208
end
209209

210210
def exec_with_allocation_control(value, exec_method, overflow_message_type)
211-
return value.send exec_method unless Debugger.trace_to_s
211+
return value.__send__ exec_method unless Debugger.trace_to_s
212212

213213
memory_limit = Debugger.debugger_memory_limit
214214
time_limit = Debugger.inspect_time_limit
215215

216216
if defined?(JRUBY_VERSION) || RUBY_VERSION < '2.0' || memory_limit <= 0
217-
return exec_with_timeout(time_limit * 1e-3, "Timeout: evaluation of #{exec_method} took longer than #{time_limit}ms.") { value.send exec_method }
217+
return exec_with_timeout(time_limit * 1e-3, "Timeout: evaluation of #{exec_method} took longer than #{time_limit}ms.") { value.__send__ exec_method }
218218
end
219219

220220
require 'objspace'
@@ -245,7 +245,7 @@ def exec_with_allocation_control(value, exec_method, overflow_message_type)
245245
end
246246
end
247247
trace_point.enable
248-
result = value.send exec_method
248+
result = value.__send__ exec_method
249249
trace_queue << result
250250
trace_point.disable
251251
end

0 commit comments

Comments
 (0)