summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--ext/syck/rubyext.c2
-rw-r--r--ext/syck/token.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b4d5b35dbe..e235615ce3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sat Mar 3 08:03:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/syck/rubyext.c (mktime_do): use ISDIGIT().
+ [ruby-core:43060] [Bug #6108]
+
+ * ext/syck/token.c (sycklex_yaml_utf8): cast as unsigned char.
+ [ruby-core:43060] [Bug #6108]
+
Sat Mar 3 06:57:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (ruby_pc): make configurable. [Bug #6051]
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c
index 2ab2e49482..92b413dc54 100644
--- a/ext/syck/rubyext.c
+++ b/ext/syck/rubyext.c
@@ -277,7 +277,7 @@ mktime_do(VALUE varg)
const char *end = ptr + 1;
const char *begin = end;
ptrdiff_t length;
- while ( isdigit( *end ) ) end++;
+ while ( ISDIGIT( *end ) ) end++;
if ((length = (end - begin)) > padding) length = padding;
MEMCPY(padded, begin, char, length);
usec = strtol(padded, NULL, 10);
diff --git a/ext/syck/token.c b/ext/syck/token.c
index 0d0d4846ba..3d05527e65 100644
--- a/ext/syck/token.c
+++ b/ext/syck/token.c
@@ -2361,7 +2361,7 @@ ScalarBlock:
{
nlDoWhat = NL_KEEP;
}
- else if ( isdigit( *yyt ) )
+ else if ( isdigit( (unsigned char)*yyt ) )
{
forceIndent = rb_long2int(strtol( yyt, NULL, 10 ));
}