From 3198e7abd70bd2af977f2bb6c967e9df8f91adb0 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 27 Oct 2020 13:42:52 +0900 Subject: Separate `send` into `public_send` and `__send__` --- lib/ostruct.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/ostruct.rb') diff --git a/lib/ostruct.rb b/lib/ostruct.rb index fd1b8e7ee2..d7ff0f630d 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -36,15 +36,15 @@ # Hash keys with spaces or characters that could normally not be used for # method calls (e.g. ()[]*) will not be immediately available # on the OpenStruct object as a method for retrieval or assignment, but can -# still be reached through the Object#send method or using []. +# still be reached through the Object#__send__ method or using []. # # measurements = OpenStruct.new("length (in inches)" => 24) # measurements[:"length (in inches)"] # => 24 -# measurements.send("length (in inches)") # => 24 +# measurements.__send__("length (in inches)") # => 24 # # message = OpenStruct.new(:queued? => true) # message.queued? # => true -# message.send("queued?=", false) +# message.__send__("queued?=", false) # message.queued? # => false # # Removing the presence of an attribute requires the execution of the -- cgit v1.2.3