https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112018-03-06T13:50:55ZRuby Issue Tracking SystemRuby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=708122018-03-06T13:50:55Zshugo (Shugo Maeda)
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-6 priority-4 priority-default closed" href="/issues/11105">Feature #11105</a>: ES6-like hash literals</i> added</li></ul> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=708132018-03-06T13:51:54Zshugo (Shugo Maeda)
<ul><li><strong>File</strong> <a href="/attachments/7065">hash_value_omission.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/7065/hash_value_omission.diff">hash_value_omission.diff</a> added</li></ul> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=709092018-03-08T11:04:40ZEregon (Benoit Daloze)
<ul></ul><p>I find this syntax very confusing.</p>
<p>The two occurrences of <code>password:</code> above means two very different things (required kwarg and auto-hash creation).</p>
<p>For</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">x</span> <span class="o">=</span> <span class="mi">1</span>
<span class="n">y</span> <span class="o">=</span> <span class="mi">2</span>
<span class="n">h</span> <span class="o">=</span> <span class="p">{</span><span class="n">x</span><span class="p">:,</span> <span class="n">y</span><span class="p">:}</span>
</code></pre>
<p>it looks to me like the values are missing.<br>
I'd prefer a syntax which is different than "key syntax without value", and refers to the variable name used for the value more clearly, like:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">x</span> <span class="o">=</span> <span class="mi">1</span>
<span class="n">y</span> <span class="o">=</span> <span class="mi">2</span>
<span class="n">h</span> <span class="o">=</span> <span class="p">{</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">}</span>
</code></pre>
<p>That would also work for the second case like so:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">def</span> <span class="nf">login</span><span class="p">(</span><span class="ss">username: </span><span class="no">ENV</span><span class="p">[</span><span class="s2">"USER"</span><span class="p">],</span> <span class="n">password</span><span class="p">:)</span>
<span class="nb">p</span><span class="p">({</span><span class="n">username</span><span class="p">,</span> <span class="n">password</span><span class="p">})</span>
<span class="k">end</span>
</code></pre> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=709112018-03-08T11:09:02ZEregon (Benoit Daloze)
<ul></ul><p>Should this also work for non-Symbols keys like:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">x</span> <span class="o">=</span> <span class="mi">1</span>
<span class="n">y</span> <span class="o">=</span> <span class="mi">2</span>
<span class="n">h</span> <span class="o">=</span> <span class="p">{</span> <span class="s2">"x"</span> <span class="o">=></span> <span class="p">,</span> <span class="s2">"y"</span> <span class="o">=></span> <span class="p">}</span>
</code></pre> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=709122018-03-08T11:30:56Zphluid61 (Matthew Kerwin)matthew@kerwin.net.au
<ul></ul><p>Eregon (Benoit Daloze) wrote:</p>
<blockquote>
<p>I'd prefer a syntax which is different than "key syntax without value", and refers to the variable name used for the value more clearly, like:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">x</span> <span class="o">=</span> <span class="mi">1</span>
<span class="n">y</span> <span class="o">=</span> <span class="mi">2</span>
<span class="n">h</span> <span class="o">=</span> <span class="p">{</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">}</span>
</code></pre>
</blockquote>
<p>Please no, this is too close to perl's weird handling of lists/hashes. To me it reads like you're trying to write:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">h</span> <span class="o">=</span> <span class="p">{</span><span class="mi">1</span><span class="o">=></span><span class="mi">2</span><span class="p">}</span>
</code></pre> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=709282018-03-09T02:55:29Zshevegen (Robert A. Heiler)shevegen@gmail.com
<ul></ul><p>I agree with Matthew.</p>
<p>I understand the suggestion trying to make the syntax even more succinct<br>
(less to type) but I think it's one step too much. Ruby already has a<br>
quite condensed syntax.</p>
<p>I think this syntax here, asked by Benoit, is also problematic:</p>
<pre><code>h = { "x" => , "y" => }
</code></pre>
<p>Has a slight "visual" problem, at the least to me. I would expect =><br>
to "point" to something on the right hand side, which the normal<br>
syntax in hashes, in ruby, requires (unless you use the foo: :bar<br>
syntax notation).</p>
<p>The:</p>
<pre><code>h = {x:, y:}
</code></pre>
<p>to my brain it's indeed a bit confusing because I would normally<br>
expect something on the right side of "foo: ".</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=709302018-03-09T08:59:46Zshugo (Shugo Maeda)
<ul></ul><p>Eregon (Benoit Daloze) wrote:</p>
<blockquote>
<p>I'd prefer a syntax which is different than "key syntax without value", and refers to the variable name used for the value more clearly, like:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">x</span> <span class="o">=</span> <span class="mi">1</span>
<span class="n">y</span> <span class="o">=</span> <span class="mi">2</span>
<span class="n">h</span> <span class="o">=</span> <span class="p">{</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">}</span>
</code></pre>
</blockquote>
<p>I proposed the above syntax in <a class="issue tracker-2 status-6 priority-4 priority-default closed" title="Feature: ES6-like hash literals (Rejected)" href="https://redmine.ruby-lang.org/issues/11105">#11105</a>, but it was rejected, and this proposal is alternative.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=709972018-03-15T06:34:36Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>I prefer this syntax to <a class="issue tracker-2 status-6 priority-4 priority-default closed" title="Feature: ES6-like hash literals (Rejected)" href="https://redmine.ruby-lang.org/issues/11105">#11105</a>, but this introduces a Ruby-specific syntax different from ES6 syntax.<br>
Besides that, I don't like both anyway because they are not intuitive (for me).</p>
<p>Matz.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=710072018-03-15T07:49:22Zshugo (Shugo Maeda)
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>matz (Yukihiro Matsumoto) wrote:</p>
<blockquote>
<p>I prefer this syntax to <a class="issue tracker-2 status-6 priority-4 priority-default closed" title="Feature: ES6-like hash literals (Rejected)" href="https://redmine.ruby-lang.org/issues/11105">#11105</a>, but this introduces a Ruby-specific syntax different from ES6 syntax.<br>
Besides that, I don't like both anyway because they are not intuitive (for me).</p>
</blockquote>
<p>So I withdraw this proposal.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=882722020-10-29T05:48:38Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/17292">Feature #17292</a>: Hash Shorthand / Punning</i> added</li></ul> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=934282021-08-20T18:18:42Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/18124">Feature #18124</a>: Hash shorthands (matching constructors functionality in JS)</i> added</li></ul> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936042021-09-11T09:20:38Zsorah (Sorah Fukumori)her@sorah.jp
<ul><li><strong>Status</strong> changed from <i>Rejected</i> to <i>Open</i></li><li><strong>Assignee</strong> set to <i>matz (Yukihiro Matsumoto)</i></li></ul> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936052021-09-11T09:28:09Zknu (Akinori MUSHA)knu@ruby-lang.org
<ul></ul><p>Here's a typical use case.</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">def</span> <span class="nf">get_user_profile</span><span class="p">(</span><span class="n">client</span><span class="p">)</span>
<span class="n">client</span><span class="p">.</span><span class="nf">get_json</span><span class="p">(</span><span class="s2">"/current_user"</span><span class="p">)</span> <span class="o">=></span> <span class="p">{</span> <span class="ss">id: </span><span class="p">}</span>
<span class="n">client</span><span class="p">.</span><span class="nf">get_json</span><span class="p">(</span><span class="s2">"/profile"</span><span class="p">,</span> <span class="p">{</span> <span class="ss">id: </span><span class="p">})</span> <span class="o">=></span> <span class="p">{</span> <span class="n">nick</span><span class="p">:,</span> <span class="ss">bio: </span><span class="p">}</span>
<span class="k">return</span> <span class="p">{</span> <span class="nb">id</span><span class="p">:,</span> <span class="n">nick</span><span class="p">:,</span> <span class="ss">bio: </span><span class="p">}</span>
<span class="k">end</span>
</code></pre> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936072021-09-11T09:52:54Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>After the RubyKaigi 2021 sessions, we have discussed this issue and I was finally persuaded.<br>
Our mindset has been updated (mostly due to mandatory keyword arguments).<br>
Accepted.</p>
<p>Matz.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936092021-09-11T09:59:53Zshugo (Shugo Maeda)
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Thank you.<br>
Committed in c60dbcd1c55cd77a24c41d5e1a9555622be8b2b8.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936182021-09-13T02:04:02Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>I assumed the value should be a local variable. The merged patch calls the method when the local variable is not defined.<br>
I doubt this is sufficient behavior. Any opinion?</p>
<p>Matz.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936192021-09-13T02:23:40Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul></ul><p>For the record: <code>{ "#{ str }": }</code> is not allowed. Matz said that it is intentional.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936212021-09-13T03:23:54Zknu (Akinori MUSHA)knu@ruby-lang.org
<ul></ul><p>We should allow it to call a (private) method if no variable with the name defined. We use methods in RSpec or with attr_reader that look like variables, and programmers don't necessarily distinguish between methods from variables when writing a program. I believe this syntax should take methods into account.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936222021-09-13T03:53:57Zbaweaver (Brandon Weaver)keystonelemur@gmail.com
<ul></ul><p>knu (Akinori MUSHA) wrote in <a href="#note-18">#note-18</a>:</p>
<blockquote>
<p>We should allow it to call a (private) method if no variable with the name defined. We use methods in RSpec or with attr_reader that look like variables, and programmers don't necessarily distinguish between methods from variables when writing a program. I believe this syntax should take methods into account.</p>
</blockquote>
<p>I would agree that (private) methods are very useful here, especially <code>attr_*</code> methods. There are a few cases I would wonder what they do:</p>
<ul>
<li>
<code>@var:</code> - Would this work with instance/class/global/constant variables if they're valid symbols?</li>
<li>
<code>a = 1; {a:, b: 3}</code> - Does it support mixing omissions and regular values?</li>
<li>
<code>p a:, b: 3</code> - Does it work with implied hashes / keywords? (I think yes).</li>
</ul>
<p>I agree that <code>{ "#{ str }": }</code> should not be allowed, as it presents potential for abuse and vulnerabilities.</p>
<p>I've <a href="https://github.com/ruby/ruby/pull/4829" class="external">PR'd the second case on mixed values</a>, but just considered the first with ivars and similar concepts. I'm not sure which way that should go.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936232021-09-13T04:03:43Zknu (Akinori MUSHA)knu@ruby-lang.org
<ul></ul><p>We also discussed further with Matz and concluded that quoted keys (<code>{ "key": }</code>) are not allowed with or without interpolation. This is simply because you don't need that when any local variable or constant can be written without quotation, and because it might make you feel it could possibly mean <code>{ "key": "key" }</code> and that would be confusing.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936242021-09-13T04:10:25Zknu (Akinori MUSHA)knu@ruby-lang.org
<ul></ul><p>baweaver (Brandon Weaver) wrote in <a href="#note-19">#note-19</a>:</p>
<blockquote>
<ul>
<li>
<code>@var:</code> - Would this work with instance/class/global/constant variables if they're valid symbols?</li>
</ul>
</blockquote>
<p>No, because we didn't change the symbol key syntax. <code>{ @var: @var }</code> is not valid, so <code>{ @var: }</code> isn't either. The same goes for <code>$var</code> and <code>@@var</code>.</p>
<blockquote>
<ul>
<li>
<code>a = 1; {a:, b: 3}</code> - Does it support mixing omissions and regular values?</li>
</ul>
</blockquote>
<p>Yes.</p>
<blockquote>
<ul>
<li>
<code>p a:, b: 3</code> - Does it work with implied hashes / keywords? (I think yes).</li>
</ul>
</blockquote>
<p>Yes, but beware when you omit the last value without the closing parenthesis. The interpreter will look further past the line end for a value.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936682021-09-15T06:13:52Zshugo (Shugo Maeda)
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Assigned</i></li></ul><p>matz (Yukihiro Matsumoto) wrote in <a href="#note-16">#note-16</a>:</p>
<blockquote>
<p>I assumed the value should be a local variable. The merged patch calls the method when the local variable is not defined.<br>
I doubt this is sufficient behavior. Any opinion?</p>
</blockquote>
<p>I believe a method should be called when a local variable is not defined.<br>
Because it's convenient as knu stated, and because <code>{x:}</code> is a syntax sugar of <code>{x: x}</code> except that keywords are allowed.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936692021-09-15T06:20:17Zshugo (Shugo Maeda)
<ul></ul><p>Note that constants are also allowed:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="no">X</span> <span class="o">=</span> <span class="mi">1</span>
<span class="nb">p</span><span class="p">(</span><span class="no">X</span><span class="p">:)</span> <span class="c1">#=> {:X=>1}</span>
</code></pre> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936702021-09-15T06:40:36Zshugo (Shugo Maeda)
<ul></ul><p>shugo (Shugo Maeda) wrote in <a href="#note-22">#note-22</a>:</p>
<blockquote>
<p>except that keywords are allowed.</p>
</blockquote>
<p>I meant that keywords are allowed as local variable or method names.<br>
For example, <code>{if:}</code> is not a syntax error and <code>{self:}</code> doesn't access the receiver but a local variable or method <code>self</code>.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936712021-09-15T07:18:38Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<ul></ul><p>shugo (Shugo Maeda) wrote in <a href="#note-24">#note-24</a>:</p>
<blockquote>
<p>I meant that keywords are allowed as local variable or method names.<br>
For example, <code>{if:}</code> is not a syntax error and <code>{self:}</code> doesn't access the receiver but a local variable or method <code>self</code>.</p>
</blockquote>
<p>Ah, so <code>{if:}</code> means something close to <code>{if: local_variable_get(:if)}</code> and '{self:}<code>means something close to</code>{self: local_variable_get(:self)}<code>(and NOT</code>{self: self}`). Not sure we need this, but also not sure it hurts.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936732021-09-15T08:54:35Zshugo (Shugo Maeda)
<ul></ul><p>duerst (Martin Dürst) wrote in <a href="#note-25">#note-25</a>:</p>
<blockquote>
<p>Ah, so <code>{if:}</code> means something close to <code>{if: local_variable_get(:if)}</code> and '{self:}<code>means something close to</code>{self: local_variable_get(:self)}<code>(and NOT</code>{self: self}`).</p>
</blockquote>
<p>Yes.<br>
Technically speaking, <code>send(:if)</code> is used instead of local_variable_get if the local variable is not defined.</p>
<blockquote>
<p>Not sure we need this, but also not sure it hurts.</p>
</blockquote>
<p>In the meeting just after RubyKaigi, someone pointed out that <code>{if:}[:if]</code> is faster than <code>binding.local_variable_get(:if)</code>.</p>
<pre><code>excelsior:ruby$ cat bm.rb
require "benchmark"
Benchmark.bmbm do |b|
->(if:) {
b.report("binding.local_variable_get") do
10000.times do
binding.local_variable_get(:if)
end
end
b.report("new hash syntax") do
10000.times do
{if:}[:if]
end
end
}.call(if: 123)
end
excelsior:ruby$ ./ruby bm.rb
Rehearsal --------------------------------------------------------------
binding.local_variable_get 0.005680 0.000211 0.005891 ( 0.005889)
new hash syntax 0.001817 0.000136 0.001953 ( 0.001965)
----------------------------------------------------- total: 0.007844sec
user system total real
binding.local_variable_get 0.003668 0.000094 0.003762 ( 0.003763)
new hash syntax 0.000829 0.000162 0.000991 ( 0.001042)
</code></pre> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936742021-09-15T09:27:42Zduerst (Martin Dürst)duerst@it.aoyama.ac.jp
<ul></ul><p>shugo (Shugo Maeda) wrote in <a href="#note-26">#note-26</a>:</p>
<blockquote>
<p>duerst (Martin Dürst) wrote in <a href="#note-25">#note-25</a>:</p>
</blockquote>
<blockquote>
<p>Technically speaking, <code>send(:if)</code> is used instead of local_variable_get if the local variable is not defined.</p>
<blockquote>
<p>Not sure we need this, but also not sure it hurts.</p>
</blockquote>
<p>In the meeting just after RubyKaigi, someone pointed out that <code>{if:}[:if]</code> is faster than <code>binding.local_variable_get(:if)</code>.</p>
</blockquote>
<p>I don't think using <code>if</code> as the name of a local variable is a good idea, and I don't think the speed of bad ideas should concern us too much.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936752021-09-15T10:00:19Zzverok (Victor Shepelev)zverok.offline@gmail.com
<ul></ul><p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/50">@duerst (Martin Dürst)</a></p>
<blockquote>
<p>I don't think using <code>if</code> as the name of a local variable is a good idea,</p>
</blockquote>
<p>It is good (and widely used, BTW) name for a method parameter, in contexts like</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">validate</span> <span class="ss">:foo</span><span class="p">,</span> <span class="ss">if: :something?</span>
</code></pre>
<p>I don't see how it is bad idea, while producing the clearest method call convention for "conditional" DSLs.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936762021-09-15T10:08:25Zshugo (Shugo Maeda)
<ul></ul><p>duerst (Martin Dürst) wrote in <a href="#note-27">#note-27</a>:</p>
<blockquote>
<p>I don't think using <code>if</code> as the name of a local variable is a good idea, and I don't think the speed of bad ideas should concern us too much.</p>
</blockquote>
<p>As zverok stated, a keyword such as <code>if</code> is used as a keyword argument (especially on Rails?).</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936852021-09-16T01:41:23ZDan0042 (Daniel DeLorme)
<ul></ul><p>matz (Yukihiro Matsumoto) wrote in <a href="#note-16">#note-16</a>:</p>
<blockquote>
<p>I assumed the value should be a local variable.</p>
</blockquote>
<p>I also assumed the same thing, but after getting over my initial surprise I found this way is quite nice, very ruby-ish. A bit like learning that <code>rescue => obj.attr</code> is valid.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=936952021-09-16T06:10:36Zshugo (Shugo Maeda)
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>Matz accepted the current behavior at <a href="https://bugs.ruby-lang.org/issues/18122" class="external">DevelopersMeeting20210916Japan</a></p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=937022021-09-16T09:22:45Zknu (Akinori MUSHA)knu@ruby-lang.org
<ul></ul><p>...Which is that <code>{ symbol: }</code> verbosely means <code>{ symbol: binding.local_variable_defined?(:symbol) ? binding.local_variable_get(:symbol) : __send__(:symbol) }</code> with no exception, no matter if the symbol is <code>if</code>, <code>self</code>, <code>fork</code>, <code>return</code> or whatever.</p> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=949572021-11-30T05:00:15Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/14973">Feature #14973</a>: Proposal of percent literal to expand Hash</i> added</li></ul> Ruby master - Feature #14579: Hash value omissionhttps://redmine.ruby-lang.org/issues/14579?journal_id=1042152023-08-22T22:35:12Zolivierlacan (Olivier Lacan)hi@olivierlacan.com
<ul></ul><p>Has it been considered to ever expand this feature to allow instance variables and global variables. Or was it strictly reserved for local variables intentionally, to avoid incompatible or dangerous behavior?</p>
<p>Thanks for adding this regardless, it's a wonderful feature.</p>