Bug #4655

String#to_c does not support scientific notation

Added by Tinco Andringa almost 3 years ago. Updated almost 3 years ago.

[ruby-core:36046]
Status:Closed
Priority:Normal
Assignee:Yukihiro Matsumoto
Category:core
Target version:1.9.3
ruby -v:- Backport:

Description

Specs have been added for this but I did not find an issue for it so I report it here.

Example:

assertequals('2e3+2e4i'.toc, Complex(2e3, 2e4))

Associated revisions

Revision 31492
Added by Kenta Murata almost 3 years ago

History

#1 Updated by Tinco Andringa almost 3 years ago

I've submitted a pull request for this bug:

https://github.com/ruby/ruby/pull/16

#2 Updated by Kenta Murata almost 3 years ago

  • Assignee set to tadayoshi funaba
  • Target version set to 1.9.3

#3 Updated by Kenta Murata almost 3 years ago

  • Assignee changed from tadayoshi funaba to Yukihiro Matsumoto

Sorry, I misunderstood that this issue is about Complex, so I assigned this to tadayoshi.
But, correctly, this is about String.
I assign this to matz again.

#4 Updated by Yukihiro Matsumoto almost 3 years ago

  • ruby -v changed from ruby 1.9.3dev (2011-05-05 trunk 31435) [x86_64-darwin10.5.0] to -

Hi,

In message "Re: [Ruby 1.9 - Bug #4655] String#to_c does not support scientific notation"
on Mon, 9 May 2011 09:32:35 +0900, Kenta Murata muraken@gmail.com writes:

|Issue #4655 has been updated by Kenta Murata.
|
|Assignee changed from tadayoshi funaba to Yukihiro Matsumoto
|
|Sorry, I misunderstood that this issue is about Complex, so I assigned this to tadayoshi.
|But, correctly, this is about String.
|I assign this to matz again.

Go ahead and merge it, if my decision is important.

                        matz.

#5 Updated by Kenta Murata almost 3 years ago

  • Status changed from Open to Closed

#6 Updated by Tinco Andringa almost 3 years ago

Issue #4655 has been updated by Kenta Murata.

Status changed from Open to Closed

Thanks for accepting my patch! :) I'm a bit of a beginner with C, I
plan on submitting patches to bugs I find every now and then. Please
let me know if you have any tips or comments about my code.

To Funaba-san: I saw you replaced my calls to strchr with strpbrk
that's awesome I didn't know that function existed. I also saw you
removed a single line of comment. Are single line comment 'hints'
frowned upon in Ruby? Do they give too much attention to the utter
lack of comments around it? :P

Thank you!
Tinco


Bug #4655: String#to_c does not support scientific notation
http://redmine.ruby-lang.org/issues/4655

Author: Tinco Andringa
Status: Closed
Priority: Normal
Assignee: Yukihiro Matsumoto
Category: core
Target version: 1.9.3
ruby -v: -

Specs have been added for this but I did not find an issue for it so I report it here.

Example:

assertequals('2e3+2e4i'.toc, Complex(2e3, 2e4))

http://redmine.ruby-lang.org

Also available in: Atom PDF