[#89806] [Ruby trunk Bug#15306] Generate prelude.c using miniruby — v.ondruch@...
Issue #15306 has been reported by vo.x (Vit Ondruch).
3 messages
2018/11/15
[ruby-core:89683] [Ruby trunk Feature#15236] add support for hash shorthand
From:
manga.osyo@...
Date:
2018-11-02 20:47:02 UTC
List:
ruby-core #89683
Issue #15236 has been updated by osyo (manga osyo).
hi, blakewest.
I proposaled it.
https://bugs.ruby-lang.org/issues/14973
I need to consider an implementation that does not use `#eval`.
----------------------------------------
Feature #15236: add support for hash shorthand
https://bugs.ruby-lang.org/issues/15236#change-74723
* Author: ignatiusreza (Ignatius Reza Lesmana)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
PR in github: https://github.com/ruby/ruby/pull/1990
inspired by javascript support for object literal shorthand notation `{ a }`, which will be expanded into `{ a: a }`..
to avoid ambiguity, this shorthand is only supported when hash is defined with `{ }` notation.. in other situation where the brackets is optional, e.g. function call, we still need to write it in full (`m(a : a)` instead of `m(a)`, or `m(a, b, c: c)` instead of `m(a, b, c)`..
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>