From 559c025a22e7a1df0182c505017eec7cb3d2228e Mon Sep 17 00:00:00 2001 From: tadf Date: Sat, 21 May 2011 12:25:03 +0000 Subject: * 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 --- ext/date/date_strptime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/date/date_strptime.c') 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); -- cgit v1.2.3