diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-06 22:50:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-06 22:50:30 +0000 |
commit | 7f00f853d4b1c09c4b37eeb6c12e8386c622fa3f (patch) | |
tree | 6d9dd7fb1f01508e9fba29b703b6770fb60f3275 /enumerator.c | |
parent | 6678422feea0bc7e3c8e3097c47ac6ef396557db (diff) | |
download | ruby-7f00f853d4b1c09c4b37eeb6c12e8386c622fa3f.tar.gz |
adjust style
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
-rw-r--r-- | enumerator.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/enumerator.c b/enumerator.c index 9223979445..081f93babc 100644 --- a/enumerator.c +++ b/enumerator.c @@ -1625,7 +1625,8 @@ lazy_take_func(VALUE val, VALUE args, int argc, VALUE *argv) } static VALUE -lazy_take_size(VALUE lazy) { +lazy_take_size(VALUE lazy) +{ long len = NUM2LONG(RARRAY_PTR(rb_ivar_get(lazy, id_arguments))[0]); VALUE receiver = lazy_receiver_size(lazy); if (NIL_P(receiver) || (FIXNUM_P(receiver) && FIX2LONG(receiver) < len)) @@ -1674,7 +1675,8 @@ lazy_take_while(VALUE obj) } static VALUE -lazy_drop_size(VALUE lazy) { +lazy_drop_size(VALUE lazy) +{ long len = NUM2LONG(RARRAY_PTR(rb_ivar_get(lazy, id_arguments))[0]); VALUE receiver = lazy_receiver_size(lazy); if (NIL_P(receiver)) @@ -1741,7 +1743,8 @@ lazy_drop_while(VALUE obj) } static VALUE -lazy_cycle_size(VALUE lazy) { +lazy_cycle_size(VALUE lazy) +{ return enum_cycle_size(rb_ivar_get(lazy, id_receiver), rb_ivar_get(lazy, id_arguments)); } |