[#71439] [Ruby trunk - Feature #11339] [PATCH] io.c: avoid kwarg parsing in C API — matz@...
Issue #11339 has been updated by Yukihiro Matsumoto.
7 messages
2015/11/11
[#71473] Re: [Ruby trunk - Feature #11339] [PATCH] io.c: avoid kwarg parsing in C API
— Eric Wong <normalperson@...>
2015/11/13
Entire series for sockets
[#71450] Ruby 2.3.0-preview1 Released — "NARUSE, Yui" <naruse@...>
Hi,
5 messages
2015/11/11
[#71617] [Ruby trunk - Feature #11664] [PATCH] introduce rb_autoload_value to replace rb_autoload — nobu@...
Issue #11664 has been updated by Nobuyoshi Nakada.
3 messages
2015/11/20
[#71721] [Ruby trunk - Feature #11741] Migrate Ruby to Git from Subversion — me@...
Issue #11741 has been updated by Jon Moss.
4 messages
2015/11/28
[ruby-core:71662] [Ruby trunk - Feature #11734] Improved ternary operator
From:
6ftdan@...
Date:
2015-11-24 20:28:54 UTC
List:
ruby-core #71662
Issue #11734 has been updated by Daniel P. Clark. `&` is associated more with proc. I think `_` would be closer to the kind of thing you're looking for. ~~~ruby some_long_expression = :baz _ ? _.to_s : 'foobar' # => "baz" ~~~ Although I tried in-lining it with a semicolon and found that the `_` feature only works off of the previous' lines results. So the following won't work. ~~~ruby :baz; _ ? _.to_s : 'foobar' # => "foobar" ~~~ And this doesn't work ~~~ruby x = 4 :fiz ? _.to_s : 'foobar' # => "4" ~~~ So if you don't mind putting your ternary operation on the next line you can just use `_` ---------------------------------------- Feature #11734: Improved ternary operator https://bugs.ruby-lang.org/issues/11734#change-55065 * Author: Yurko Bregey * Status: Open * Priority: Normal * Assignee: ---------------------------------------- In ternary operator it would be nice to be able to pass expression result from *condition* into *value_if_true/value_if_false* in such way: `some_long_expression ? &.to_s : 'foobar'` where `&` refers to `some_long_expression` Instead of doing: `some_long_expression ? some_long_expression.to_s : 'foobar'` or: `result = some_very_very_long_expression result ? result.to_s : 'foobar'` -- https://bugs.ruby-lang.org/