зеркало из https://github.com/github/ruby.git
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:
Родитель
f5c7d1074f
Коммит
b4dc41d42e
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче