[#23132] [Bug #1357] Fixing variables into specific CPU registers deemed overrated & may disturb compilers' optimizers — Ollivier Robert <redmine@...>
Bug #1357: Fixing variables into specific CPU registers deemed overrated & may disturb compilers' optimizers
[#23154] [Bug #1363] Wrong value for Hash of NaN — Heesob Park <redmine@...>
Bug #1363: Wrong value for Hash of NaN
Hi,
Hi,
Yukihiro Matsumoto wrote:
[#23168] [Bug #1367] flatten(0) is not consistent with flatten(), flatten(1), etc. — Paul Lewis <redmine@...>
Bug #1367: flatten(0) is not consistent with flatten(), flatten(1), etc.
Issue #1367 has been updated by Paul Lewis.
[#23174] [Feature #1371] FTPS Implicit — Daniel Parker <redmine@...>
Feature #1371: FTPS Implicit
[#23193] Regexp Encoding — James Gray <james@...>
I'm trying to document the Encoding Regexp objects receive for the
[#23194] [Feature #1377] Please provide constant File::NOATIME — Johan Walles <redmine@...>
Feature #1377: Please provide constant File::NOATIME
[#23231] What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file? — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>
Dear Ruby developers and users!
Wolfgang N叩dasi-Donner wrote:
Wolfgang N叩dasi-Donner wrote:
Michael Neumann schrieb:
[#23252] [Bug #1392] Object#extend leaks memory on Ruby 1.9.1 — Muhammad Ali <redmine@...>
Bug #1392: Object#extend leaks memory on Ruby 1.9.1
[#23267] StringIO: RubySpec violation — Hongli Lai <hongli@...99.net>
I ran RubySpec against the 1.8.6-p368 release. It seems that
[#23289] [Bug #1399] Segmentation fault is raised when you use a postgres gem — Marcel Keil <redmine@...>
Bug #1399: Segmentation fault is raised when you use a postgres gem
[#23297] Ruby Oniguruma question — Ralf Junker <ralfjunker@...>
I see that the Ruby source code contains modified and more recent version of the Oniguruma regular expression library.
[#23305] [Bug #1403] Process.daemon should do a double fork to avoid problems with controlling terminals — Gary Wright <redmine@...>
Bug #1403: Process.daemon should do a double fork to avoid problems with controlling terminals
Hi,
[#23311] [Bug #1404] Net::HTTP::Post failing when a post field contains ":" — Ignacio Martín <redmine@...>
Bug #1404: Net::HTTP::Post failing when a post field contains ":"
[#23318] [Feature #1408] 0.1.to_r not equal to (1/10) — Heesob Park <redmine@...>
Feature #1408: 0.1.to_r not equal to (1/10)
Issue #1408 has been updated by tadayoshi funaba.
Hi,
Hi.
Issue #1408 has been updated by Marc-Andre Lafortune.
Issue #1408 has been updated by Roger Pack.
[#23321] [Bug #1412] 1.8.7-p160 extmk.rb fails when cross compiling — Luis Lavena <redmine@...>
Bug #1412: 1.8.7-p160 extmk.rb fails when cross compiling
[ruby-core:23187] Re: [Bug #1336] Change in string representation of Floats
Perhaps I'm not understanding the question.
Consider:
s = "string"
s.inspect ==> "string" #this will round-trip
s.to_s ==> string #this lacks the required delimiters
s = :symbol
s.inspect ==> :symbol #similarly...
s.to_s ==> symbol #but this lacks delimiters and is abiguous
a = [1,2,3] #again...
a.inspect ==> [1, 2, 3]
a.to_s ==> 123 #this is pretty useless
h = [:foo=>:bar, :bar=>:foo] #and, finally...
a.inspect ==> {:foo=>:bar, :bar=>:foo}
a.to_s ==> foobarbarfoo #as is this.
In all the above examples, the #inspect method outputs delimiters necessary
for Ruby's parser to recreate the data object, while the #to_s method omits
delimiters to produce terser, albeit sometimes ambiguous, output.
Admittedly, to_s doesn't work very well on collections, but, it will convert
any basic type to a short, human readable string free of extraneous
punctuation. Float#to_s should do the same for consistency' sake.
As a practical matter, changing Float#to_s at this point will cause many no
longer maintained Ruby scripts to output confusing long trains of digits
after the decimal. And, consider the bugs that will emerge when data base
queries on ranges of values like 0.1 to 0.9, if the string representations
actually passed (from Ruby via Float.to_s) into the data base engine (which
for all we know is using decimal floats) are in fact 0.10000000000000001 to
0.90000000000000002
- brent
Yukihiro Matsumoto wrote:
>
> Hi,
>
> In message "Re: [ruby-core:23181] Re: [Bug #1336] Change in string
> representation of Floats"
> on Sun, 12 Apr 2009 03:53:12 +0900, Brent Roman <brent@mbari.org>
> writes:
>
> |I'd prefer that Float#to_s => rounded, Float#inspect => non rounded
> |(i.e. 0.9.inspect => "0.8999999999")
>
> I see several people who prefer that way. Could you elaborate the
> reason behind the preference? Considering being to_s for mere string
> representation, and inspect being human readable string
> representation, I thought other way around.
>
> matz.
>
>
>
--
View this message in context: http://www.nabble.com/-ruby-core%3A23075---Bug--1336--Change-in-string-representation-of-Floats-tp22798535p23016776.html
Sent from the ruby-core mailing list archive at Nabble.com.