[#66126] Creation/Conversion methods/functions table for Ruby types — SASADA Koichi <ko1@...>
Hi,
5 messages
2014/11/07
[#66248] [ruby-trunk - Feature #10423] [PATCH] opt_str_lit*: avoid literal string allocations — normalperson@...
Issue #10423 has been updated by Eric Wong.
3 messages
2014/11/13
[#66595] [ruby-trunk - Bug #10557] [Open] Block not given when the argument is a string — bartosz@...
Issue #10557 has been reported by Bartosz Kopinski.
3 messages
2014/11/30
[ruby-core:66381] [CommonRuby - Feature #10528] Allow line breaks instead of commas in arrays, hashes, argument lists, etc.
From:
alexey.muranov@...
Date:
2014-11-20 17:20:19 UTC
List:
ruby-core #66381
Issue #10528 has been updated by Alexey Muranov.
I forgot to mention other usual cases when lines should be implicitly continued: after a dot, after an operator symbol, etc.
----------------------------------------
Feature #10528: Allow line breaks instead of commas in arrays, hashes, argument lists, etc.
https://bugs.ruby-lang.org/issues/10528#change-50026
* Author: Alexey Muranov
* Status: Open
* Priority: Normal
* Assignee:
* Category:
* Target version:
----------------------------------------
Since the seemingly reasonable proposal #8956 has been rejected because it "diverged so far from the original", i will dare to propose another version here.
I suggest to automatically convert line breaks inside parentheses `(...)`, inside "hashy" braces `{...}`, inside brackets `[...]`, and inside block argument lists `|...|`, if they are not preceded with a comma and skipping empty space, into a comma, while all other line breaks that are not preceded with a semicolon into a semicolon (skipping empty lines). Unless, of course, the line break is preceded with `\` or followed by a dot `.`.
I would be possible to write then:
```ruby
todo = [ 'shopping'
'cinema'
'restaurant' ]
rules = { 'evil' => 'bad'
'kind' => 'good' }
```
--
https://bugs.ruby-lang.org/