diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-10-27 13:42:52 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-10-27 16:12:45 +0900 |
commit | 3198e7abd70bd2af977f2bb6c967e9df8f91adb0 (patch) | |
tree | 12265cda813be994c0aaa3a63c66a06f15e91354 /lib/net | |
parent | acdb8933384da8fce1e8d8a96946eacfaa8897e2 (diff) |
Separate `send` into `public_send` and `__send__`
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/ftp.rb | 2 | ||||
-rw-r--r-- | lib/net/imap.rb | 10 | ||||
-rw-r--r-- | lib/net/smtp.rb | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index aff9e7ec60..bd8c8ab476 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -1049,7 +1049,7 @@ module Net raise FTPProtoError, "invalid time-val: #{value}" end usec = fractions.to_i * 10 ** (6 - fractions.to_s.size) - Time.send(local ? :local : :utc, year, month, day, hour, min, sec, usec) + Time.public_send(local ? :local : :utc, year, month, day, hour, min, sec, usec) } FACT_PARSERS = Hash.new(CASE_DEPENDENT_PARSER) FACT_PARSERS["size"] = DECIMAL_PARSER diff --git a/lib/net/imap.rb b/lib/net/imap.rb index de13d0807c..ae23c0acf9 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -1542,7 +1542,7 @@ module Net class RawData # :nodoc: def send_data(imap, tag) - imap.send(:put_string, @data) + imap.__send__(:put_string, @data) end def validate @@ -1557,7 +1557,7 @@ module Net class Atom # :nodoc: def send_data(imap, tag) - imap.send(:put_string, @data) + imap.__send__(:put_string, @data) end def validate @@ -1572,7 +1572,7 @@ module Net class QuotedString # :nodoc: def send_data(imap, tag) - imap.send(:send_quoted_string, @data) + imap.__send__(:send_quoted_string, @data) end def validate @@ -1587,7 +1587,7 @@ module Net class Literal # :nodoc: def send_data(imap, tag) - imap.send(:send_literal, @data, tag) + imap.__send__(:send_literal, @data, tag) end def validate @@ -1602,7 +1602,7 @@ module Net class MessageSet # :nodoc: def send_data(imap, tag) - imap.send(:put_string, format_internal(@data)) + imap.__send__(:put_string, format_internal(@data)) end def validate diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb index 810da77df4..e58d8fb77a 100644 --- a/lib/net/smtp.rb +++ b/lib/net/smtp.rb @@ -745,7 +745,7 @@ module Net def authenticate(user, secret, authtype = DEFAULT_AUTH_TYPE) check_auth_method authtype check_auth_args user, secret - send auth_method(authtype), user, secret + public_send auth_method(authtype), user, secret end def auth_plain(user, secret) |