mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* enum.c (Enumerable#chunk): fix grammar of error message
for symbols beginning with an underscore [Bug #8351] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f0a5e1fc3c
commit
bd14f5bf94
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Wed May 1 18:59:36 2013 Benoit Daloze <eregontp@gmail.com>
|
||||||
|
|
||||||
|
* enum.c (Enumerable#chunk): fix grammar of error message
|
||||||
|
for symbols beginning with an underscore [Bug #8351]
|
||||||
|
|
||||||
Wed May 1 16:47:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed May 1 16:47:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/curses/extconf.rb (curses_version): try once for each tests, a
|
* ext/curses/extconf.rb (curses_version): try once for each tests, a
|
||||||
|
|
4
enum.c
4
enum.c
|
@ -2358,7 +2358,7 @@ chunk_ii(VALUE i, VALUE _argp, int argc, VALUE *argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (SYMBOL_P(v) && rb_id2name(SYM2ID(v))[0] == '_') {
|
else if (SYMBOL_P(v) && rb_id2name(SYM2ID(v))[0] == '_') {
|
||||||
rb_raise(rb_eRuntimeError, "symbol begins with an underscore is reserved");
|
rb_raise(rb_eRuntimeError, "symbols beginning with an underscore are reserved");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (NIL_P(argp->prev_value)) {
|
if (NIL_P(argp->prev_value)) {
|
||||||
|
@ -2447,7 +2447,7 @@ chunk_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv)
|
||||||
* Any other symbols that begin with an underscore will raise an error:
|
* Any other symbols that begin with an underscore will raise an error:
|
||||||
*
|
*
|
||||||
* items.chunk { |item| :_underscore }
|
* items.chunk { |item| :_underscore }
|
||||||
* #=> RuntimeError: symbol begins with an underscore is reserved
|
* #=> RuntimeError: symbols beginning with an underscore are reserved
|
||||||
*
|
*
|
||||||
* +nil+ and +:_separator+ can be used to ignore some elements.
|
* +nil+ and +:_separator+ can be used to ignore some elements.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue