Hi,

In message "Re: [ruby-core:95142] [Ruby master Feature#16150] Add a way to request a frozen string from to_s"
    on Sat, 28 Sep 2019 04:33:32 +0000 (UTC), headius / headius.com writes:

>Issue #16150 has been updated by headius (Charles Nutter).
>
>
>> Not exactly, -@ and +@ makes this much simpler
>
>I do like the unary operators, but they also have some precedence oddities:
>
>```
>>> -"foo".size
>=> -3
>>> (-"foo").size
>=> 3
>```
>
>And it doesn't work at all if you're chaining method calls:

How about making String#+ and #- without argument behave like #+@ and #-@ respectively, so that we can write:

```
"foo".-.size
ary.+.to_s.frozen?
```

							matz.

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>