From: "chucke (Tiago Cardoso)" Date: 2021-10-07T17:36:20+00:00 Subject: [ruby-core:105594] [Ruby master Bug#18246] send does not work for unary ! operator when operator isn't a literal symbol Issue #18246 has been reported by chucke (Tiago Cardoso). ---------------------------------------- Bug #18246: send does not work for unary ! operator when operator isn't a literal symbol https://bugs.ruby-lang.org/issues/18246 * Author: chucke (Tiago Cardoso) * Status: Open * Priority: Normal * ruby -v: 3.0.2 * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- ```ruby 1.send(:+, 1) #=> 2 1.send(:"+", 1) #=> 2 1.send(:-@) #=> -1 1.send(:"-@") #=> -1 false.send(:!@) #=> true false.send(:"!@") #> # undefined method `!@' for false:FalseClass (NoMethodError) # Did you mean? != !~ ``` -- https://bugs.ruby-lang.org/ Unsubscribe: