Ruby Issue Tracking System: Issueshttps://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112019-06-03T09:18:57ZRuby Issue Tracking System
Redmine Ruby master - Bug #15895 (Closed): String#gsub and String#sub should return original string if no...https://bugs.ruby-lang.org/issues/158952019-06-03T09:18:57Zashmaroli (Ashwin Maroli)
<p>Currently if one were to call <code>'Hello World'.gsub(/[<&>]/, html_entities_hash)</code> , a copy of 'Hello World' is allocated and returned. If such a call were to occur inside a loop, then that would cause numerous copies to be allocated simply from an attempt at substitution.</p>
<p>Likewise for <code>'Hello World'.sub(/\d+/, 'x')</code></p>
<p>Opting for the destructive alternatives is not possible since the original string should remain unchanged in all cases.</p>
<p>IMO, it'd be great to have the original string returned if substitution(s) couldn't be made.</p> Ruby master - Bug #15655 (Closed): Unable to handle Russian dirname on Windowshttps://bugs.ruby-lang.org/issues/156552019-03-11T10:08:55Zashmaroli (Ashwin Maroli)
<p>I'm unable to work in a directory with a Russian name.<br>
Running <code>bundle exec ...</code> returns an error from Bundler saying that it couldn't locate the Gemfile (which is present)</p>
<pre><code class="shell syntaxhl" data-language="shell"><span class="c"># print current directory</span>
<span class="o">></span> <span class="nb">echo</span> %CD%
<span class="o">=></span> D:<span class="se">\Е</span>вгений
<span class="c"># print contents at root</span>
<span class="o">></span> <span class="nb">ls</span>
<span class="o">=></span> 404.html Gemfile _config.yml _posts about.markdown index.markdown
<span class="c"># List dependencies via Bundler</span>
<span class="o">></span> bundle show
<span class="o">=></span> Could not locate Gemfile or .bundle/ directory
<span class="c"># Debug in IRB</span>
<span class="o">></span> irb
irb<span class="o">(</span>main<span class="o">)</span>:001:0> Dir.pwd
<span class="o">=></span> <span class="s2">"D:/???????"</span>
</code></pre>