mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Revert "Prefer #send over #__send__ when it is clear there is no possible conflict"
This reverts commit 4dba0c1a8e
.
Matz's comment is "send is not deprecated. __send__ is safer".
But "Prefer #send over #__send__" is not reasonable.
This commit is contained in:
parent
b29fe5eb2d
commit
3407b7d8a6
5 changed files with 8 additions and 8 deletions
|
@ -88,7 +88,7 @@ def cp
|
|||
options[:preserve] = true if options.delete :p
|
||||
dest = argv.pop
|
||||
argv = argv[0] if argv.size == 1
|
||||
FileUtils.send cmd, argv, dest, **options
|
||||
FileUtils.__send__ cmd, argv, dest, **options
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -109,7 +109,7 @@ def ln
|
|||
options[:force] = true if options.delete :f
|
||||
dest = argv.pop
|
||||
argv = argv[0] if argv.size == 1
|
||||
FileUtils.send cmd, argv, dest, **options
|
||||
FileUtils.__send__ cmd, argv, dest, **options
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -144,7 +144,7 @@ def rm
|
|||
cmd = "rm"
|
||||
cmd += "_r" if options.delete :r
|
||||
options[:force] = true if options.delete :f
|
||||
FileUtils.send cmd, argv, **options
|
||||
FileUtils.__send__ cmd, argv, **options
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -161,7 +161,7 @@ def mkdir
|
|||
setup("p") do |argv, options|
|
||||
cmd = "mkdir"
|
||||
cmd += "_p" if options.delete :p
|
||||
FileUtils.send cmd, argv, **options
|
||||
FileUtils.__send__ cmd, argv, **options
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue