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

fix style.

* ext/stringio/stringio.c (strio_each, strio_readlines): fix style.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-04-14 12:16:09 +00:00
parent f5c7d1074f
commit b4dc41d42e

View file

@ -1069,8 +1069,8 @@ strio_each(int argc, VALUE *argv, VALUE self)
RETURN_ENUMERATOR(self, argc, argv);
if(argc > 0 && !NIL_P(argv[argc-1]) && NIL_P(rb_check_string_type(argv[argc-1])) &&
NUM2LONG(argv[argc-1]) == 0) {
if (argc > 0 && !NIL_P(argv[argc-1]) && NIL_P(rb_check_string_type(argv[argc-1])) &&
NUM2LONG(argv[argc-1]) == 0) {
rb_raise(rb_eArgError, "invalid limit: 0 for each_line");
}
@ -1094,8 +1094,8 @@ strio_readlines(int argc, VALUE *argv, VALUE self)
struct StringIO *ptr = StringIO(self);
VALUE ary = rb_ary_new(), line;
if(argc > 0 && !NIL_P(argv[argc-1]) && NIL_P(rb_check_string_type(argv[argc-1])) &&
NUM2LONG(argv[argc-1]) == 0) {
if (argc > 0 && !NIL_P(argv[argc-1]) && NIL_P(rb_check_string_type(argv[argc-1])) &&
NUM2LONG(argv[argc-1]) == 0) {
rb_raise(rb_eArgError, "invalid limit: 0 for readlines");
}