[macruby-changes] [4941] MacRuby/trunk/util.c
source_changes at macosforge.org
source_changes at macosforge.org
Wed Nov 24 07:25:26 PST 2010
Revision: 4941
http://trac.macosforge.org/projects/ruby/changeset/4941
Author: watson1978 at gmail.com
Date: 2010-11-24 07:25:23 -0800 (Wed, 24 Nov 2010)
Log Message:
-----------
fixed the bug of ruby_strtod().
Test Script:
{{{
require 'test/unit/assertions.rb'
include Test::Unit::Assertions
assert_raise(ArgumentError){ "%E" % "10." }
puts :ok
}}}
Modified Paths:
--------------
MacRuby/trunk/util.c
Modified: MacRuby/trunk/util.c
===================================================================
--- MacRuby/trunk/util.c 2010-11-23 04:11:45 UTC (rev 4940)
+++ MacRuby/trunk/util.c 2010-11-24 15:25:23 UTC (rev 4941)
@@ -2280,6 +2280,9 @@
}
#endif
if (c == '.') {
+ if (!ISDIGIT(s[1])) {
+ goto dig_done;
+ }
c = *++s;
if (!nd) {
for (; c == '0'; c = *++s)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101124/0e5558bf/attachment.html>
More information about the macruby-changes
mailing list