https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112011-05-09T08:56:39ZRuby Issue Tracking SystemRuby master - Bug #4655: String#to_c does not support scientific notationhttps://bugs.ruby-lang.org/issues/4655?journal_id=168152011-05-09T08:56:39Zd-snp (Tinco Andringa)mail@tinco.nl
<ul></ul><p>I've submitted a pull request for this bug:</p>
<p><a href="https://github.com/ruby/ruby/pull/16" class="external">https://github.com/ruby/ruby/pull/16</a></p> Ruby master - Bug #4655: String#to_c does not support scientific notationhttps://bugs.ruby-lang.org/issues/4655?journal_id=168162011-05-09T09:18:44Zmrkn (Kenta Murata)muraken@gmail.com
<ul><li><strong>Assignee</strong> set to <i>tadf (tadayoshi funaba)</i></li><li><strong>Target version</strong> set to <i>1.9.3</i></li></ul> Ruby master - Bug #4655: String#to_c does not support scientific notationhttps://bugs.ruby-lang.org/issues/4655?journal_id=168172011-05-09T09:32:34Zmrkn (Kenta Murata)muraken@gmail.com
<ul><li><strong>Assignee</strong> changed from <i>tadf (tadayoshi funaba)</i> to <i>matz (Yukihiro Matsumoto)</i></li></ul><p>Sorry, I misunderstood that this issue is about Complex, so I assigned this to tadayoshi.<br>
But, correctly, this is about String.<br>
I assign this to matz again.</p> Ruby master - Bug #4655: String#to_c does not support scientific notationhttps://bugs.ruby-lang.org/issues/4655?journal_id=168192011-05-09T10:23:07Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul><li><strong>ruby -v</strong> changed from <i>ruby 1.9.3dev (2011-05-05 trunk 31435) [x86_64-darwin10.5.0]</i> to <i>-</i></li></ul><p>Hi,</p>
<p>In message "Re: <a href="/issues/4655">[ruby-core:36049]</a> [Ruby 1.9 - Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: String#to_c does not support scientific notation (Closed)" href="https://bugs.ruby-lang.org/issues/4655">#4655</a>] String#to_c does not support scientific notation"<br>
on Mon, 9 May 2011 09:32:35 +0900, Kenta Murata <a href="mailto:muraken@gmail.com" class="email">muraken@gmail.com</a> writes:</p>
<p>|Issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: String#to_c does not support scientific notation (Closed)" href="https://bugs.ruby-lang.org/issues/4655">#4655</a> has been updated by Kenta Murata.<br>
|<br>
|Assignee changed from tadayoshi funaba to Yukihiro Matsumoto<br>
|<br>
|Sorry, I misunderstood that this issue is about Complex, so I assigned this to tadayoshi.<br>
|But, correctly, this is about String.<br>
|I assign this to matz again.</p>
<p>Go ahead and merge it, if my decision is important.</p>
<pre><code> matz.
</code></pre> Ruby master - Bug #4655: String#to_c does not support scientific notationhttps://bugs.ruby-lang.org/issues/4655?journal_id=168222011-05-09T17:24:43Zmrkn (Kenta Murata)muraken@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul> Ruby master - Bug #4655: String#to_c does not support scientific notationhttps://bugs.ruby-lang.org/issues/4655?journal_id=168372011-05-10T01:23:11Zd-snp (Tinco Andringa)mail@tinco.nl
<ul></ul><blockquote>
<p>Issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: String#to_c does not support scientific notation (Closed)" href="https://bugs.ruby-lang.org/issues/4655">#4655</a> has been updated by Kenta Murata.</p>
<p>Status changed from Open to Closed</p>
</blockquote>
<p>Thanks for accepting my patch! :) I'm a bit of a beginner with C, I<br>
plan on submitting patches to bugs I find every now and then. Please<br>
let me know if you have any tips or comments about my code.</p>
<p>To Funaba-san: I saw you replaced my calls to strchr with strpbrk<br>
that's awesome I didn't know that function existed. I also saw you<br>
removed a single line of comment. Are single line comment 'hints'<br>
frowned upon in Ruby? Do they give too much attention to the utter<br>
lack of comments around it? :P</p>
<p>Thank you!<br>
Tinco</p>
<blockquote>
<hr>
<p>Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: String#to_c does not support scientific notation (Closed)" href="https://bugs.ruby-lang.org/issues/4655">#4655</a>: String#to_c does not support scientific notation<br>
<a href="http://redmine.ruby-lang.org/issues/4655" class="external">http://redmine.ruby-lang.org/issues/4655</a></p>
<p>Author: Tinco Andringa<br>
Status: Closed<br>
Priority: Normal<br>
Assignee: Yukihiro Matsumoto<br>
Category: core<br>
Target version: 1.9.3<br>
ruby -v: -</p>
<p>Specs have been added for this but I did not find an issue for it so I report it here.</p>
<p>Example:</p>
<p>assert_equals('2e3+2e4i'.to_c, Complex(2e3, 2e4))</p>
<p>--<br>
<a href="http://redmine.ruby-lang.org" class="external">http://redmine.ruby-lang.org</a></p>
</blockquote>