diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-21 12:25:03 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-21 12:25:03 +0000 |
commit | 559c025a22e7a1df0182c505017eec7cb3d2228e (patch) | |
tree | 94a871cf9f9b59e144a2d31b44cd0d4c884c98f4 /ext/date/date_strptime.c | |
parent | 42cb637942628ab87119482e4bcf372cdc19f6d6 (diff) | |
download | ruby-559c025a22e7a1df0182c505017eec7cb3d2228e.tar.gz |
* ext/date/date_{core,parse}.c: moved nearly all core code from ext/date/lib.
* ext/date/lib/{date,date/format}.rb: removed nearly all code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date/date_strptime.c')
-rw-r--r-- | ext/date/date_strptime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/date/date_strptime.c b/ext/date/date_strptime.c index 897f5f8807..80b9e03278 100644 --- a/ext/date/date_strptime.c +++ b/ext/date/date_strptime.c @@ -40,6 +40,7 @@ static const char *extz_pats[] = { #define f_sub(x,y) rb_funcall(x, '-', 1, y) #define f_mul(x,y) rb_funcall(x, '*', 1, y) #define f_div(x,y) rb_funcall(x, '/', 1, y) +#define f_idiv(x,y) rb_funcall(x, rb_intern("div"), 1, y) #define f_mod(x,y) rb_funcall(x, '%', 1, y) #define f_expt(x,y) rb_funcall(x, rb_intern("**"), 1, y) @@ -559,7 +560,6 @@ date__strptime_internal(const char *str, size_t slen, goto matched; } - case 'Z': case 'z': { @@ -585,7 +585,7 @@ date__strptime_internal(const char *str, size_t slen, if (!NIL_P(m)) { VALUE s, l, o; - s = f_aref(m, INT2FIX(1)); + s = rb_reg_nth_match(1, m); l = f_end(m, INT2FIX(0)); o = date_zone_to_diff(s); si += NUM2LONG(l); |