зеркало из https://github.com/github/ruby.git
* parse.y (ripper_s_allocate): add prototype for Microsoft compiler.
* range.c (range_step, range_each): need cast. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
7c04db1d3c
Коммит
61edd31bf6
|
@ -1,3 +1,9 @@
|
|||
Fri Oct 29 17:18:22 2004 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* parse.y (ripper_s_allocate): add prototype for Microsoft compiler.
|
||||
|
||||
* range.c (range_step, range_each): need cast.
|
||||
|
||||
Fri Oct 29 11:35:04 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (rb_parser_append_print, rb_parser_while_loop): body node
|
||||
|
|
1
parse.y
1
parse.y
|
@ -8504,6 +8504,7 @@ ripper_lex_get_generic(parser, src)
|
|||
return rb_funcall(src, ripper_id_gets, 0);
|
||||
}
|
||||
|
||||
static VALUE ripper_s_allocate _((VALUE));
|
||||
static VALUE
|
||||
ripper_s_allocate(klass)
|
||||
VALUE klass;
|
||||
|
|
6
range.c
6
range.c
|
@ -335,7 +335,8 @@ range_step(argc, argv, range)
|
|||
if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
|
||||
args[0] = b; args[1] = e; args[2] = range;
|
||||
iter[0] = 1; iter[1] = unit;
|
||||
rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
|
||||
rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
|
||||
(VALUE)iter);
|
||||
}
|
||||
else if (rb_obj_is_kind_of(b, rb_cNumeric)) {
|
||||
ID c = rb_intern(EXCL(range) ? "<" : "<=");
|
||||
|
@ -417,7 +418,8 @@ range_each(range)
|
|||
|
||||
args[0] = beg; args[1] = end; args[2] = range;
|
||||
iter[0] = 1; iter[1] = 1;
|
||||
rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
|
||||
rb_iterate((VALUE(*)_((VALUE)))str_step, (VALUE)args, step_i,
|
||||
(VALUE)iter);
|
||||
}
|
||||
else {
|
||||
range_each_func(range, each_i, beg, end, NULL);
|
||||
|
|
Загрузка…
Ссылка в новой задаче