summaryrefslogtreecommitdiff
path: root/lib/irb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-11-05 11:23:27 +0100
committerBenoit Daloze <eregontp@gmail.com>2020-11-05 11:23:27 +0100
commit4dba0c1a8e3cc08664872e637099c4e7d58d24d3 (patch)
treed86deaec8225b8c82acc58a9ce655d94b4bd9311 /lib/irb
parent2aa9a50dcc88b876f8298adda737400973e8029f (diff)
Prefer #send over #__send__ when it is clear there is no possible conflict
* Reverts part of 3198e7abd70bd2af977f2bb6c967e9df8f91adb0. * If the rule is #send should be deprecated, that should be ruled by matz, there is no such rule currently and gems seem to prefer #send overwhelmingly.
Diffstat (limited to 'lib/irb')
-rw-r--r--lib/irb/cmd/fork.rb2
-rw-r--r--lib/irb/completion.rb2
-rw-r--r--lib/irb/easter-egg.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/irb/cmd/fork.rb b/lib/irb/cmd/fork.rb
index 7566d10be0..19c78fc910 100644
--- a/lib/irb/cmd/fork.rb
+++ b/lib/irb/cmd/fork.rb
@@ -16,7 +16,7 @@ module IRB
module ExtendCommand
class Fork < Nop
def execute
- pid = __send__ ExtendCommand.irb_original_method_name("fork")
+ pid = send ExtendCommand.irb_original_method_name("fork")
unless pid
class << self
alias_method :exit, ExtendCommand.irb_original_method_name('exit')
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb
index 6d82139aeb..c9328e5c5a 100644
--- a/lib/irb/completion.rb
+++ b/lib/irb/completion.rb
@@ -268,7 +268,7 @@ module IRB
PerfectMatchedProc = ->(matched, bind: IRB.conf[:MAIN_CONTEXT].workspace.binding) {
RDocRIDriver ||= RDoc::RI::Driver.new
if matched =~ /\A(?:::)?RubyVM/ and not ENV['RUBY_YES_I_AM_NOT_A_NORMAL_USER']
- IRB.__send__(:easter_egg)
+ IRB.send(:easter_egg)
return
end
namespace = retrieve_completion_data(matched, bind: bind, doc_namespace: true)
diff --git a/lib/irb/easter-egg.rb b/lib/irb/easter-egg.rb
index 3e79692de9..be7f47197e 100644
--- a/lib/irb/easter-egg.rb
+++ b/lib/irb/easter-egg.rb
@@ -135,4 +135,4 @@ module IRB
end
end
-IRB.__send__(:easter_egg, ARGV[0]&.to_sym) if $0 == __FILE__
+IRB.send(:easter_egg, ARGV[0]&.to_sym) if $0 == __FILE__