summaryrefslogtreecommitdiff
path: root/ext/date/date_strptime.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-18 22:54:09 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-18 22:54:09 +0000
commit1d794b933582604fd541479999bc7e3cc3bed0f0 ()
tree71f1340cddc75262eb3932b38930e04ca6ff6149 /ext/date/date_strptime.c
parent6bada9cc0a930c003b2b12892153e373046b7e54 (diff)
ext/date/date_strptime.c: moved detector of leftover.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/date/date_strptime.c21
1 files changed, 10 insertions, 11 deletions
@@ -1,5 +1,5 @@
/*
- date_strptime.c: Coded by Tadayoshi Funaba 2011
*/
#include "ruby.h"
@@ -641,15 +641,6 @@ date__strptime_internal(const char *str, size_t slen,
}
}
- {
- VALUE s;
-
- if (slen > si) {
- s = rb_usascii_str_new(&str[si], slen - si);
- set_hash("leftover", s);
- }
- }
-
return si;
}
@@ -657,9 +648,17 @@ VALUE
date__strptime(const char *str, size_t slen,
const char *fmt, size_t flen, VALUE hash)
{
VALUE cent, merid;
- date__strptime_internal(str, slen, fmt, flen, hash);
if (fail_p())
return Qnil;