1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* expand tabs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
svn 2019-04-03 10:56:37 +00:00
parent 1329c7cdca
commit a6146af5bd

View file

@ -1862,26 +1862,26 @@ parse_ddd_cb(VALUE m, VALUE hash)
set_hash("zone", s5); set_hash("zone", s5);
if (*cs5 == '[') { if (*cs5 == '[') {
const char *s1, *s2; const char *s1, *s2;
VALUE zone; VALUE zone;
l5 -= 2; l5 -= 2;
s1 = cs5 + 1; s1 = cs5 + 1;
s2 = memchr(s1, ':', l5); s2 = memchr(s1, ':', l5);
if (s2) { if (s2) {
s2++; s2++;
zone = rb_str_subseq(s5, s2 - cs5, l5 - (s2 - s1)); zone = rb_str_subseq(s5, s2 - cs5, l5 - (s2 - s1));
s5 = rb_str_subseq(s5, 1, s2 - s1); s5 = rb_str_subseq(s5, 1, s2 - s1);
} }
else { else {
zone = rb_str_subseq(s5, 1, l5); zone = rb_str_subseq(s5, 1, l5);
if (isdigit((unsigned char)*s1)) if (isdigit((unsigned char)*s1))
s5 = rb_str_append(rb_str_new_cstr("+"), zone); s5 = rb_str_append(rb_str_new_cstr("+"), zone);
else else
s5 = zone; s5 = zone;
} }
set_hash("zone", zone); set_hash("zone", zone);
set_hash("offset", date_zone_to_diff(s5)); set_hash("offset", date_zone_to_diff(s5));
} }
RB_GC_GUARD(s5); RB_GC_GUARD(s5);
} }