зеркало из https://github.com/github/ruby.git
compile.c: no keyword check if kw_rest
* compile.c (iseq_set_arguments): no keyword check if any keyword rest argument exists, even unnamed. [ruby-core:52744] [Bug #7922] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a6d08b450c
Коммит
45dea57588
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Sun Feb 24 07:51:28 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* compile.c (iseq_set_arguments): no keyword check if any keyword rest
|
||||
argument exists, even unnamed. [ruby-core:52744] [Bug #7922]
|
||||
|
||||
Sun Feb 24 07:50:53 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* compile.c (iseq_set_arguments): no keyword check if any keyword rest
|
||||
argument exists, even unnamed. [ruby-core:52744] [Bug #7922]
|
||||
|
||||
Sat Feb 23 16:51:00 2013 Zachary Scott <zachary@zacharyscott.net>
|
||||
|
||||
* thread.c: Documentation for Thread#backtrace_locations
|
||||
|
|
|
@ -1204,7 +1204,6 @@ iseq_set_arguments(rb_iseq_t *iseq, LINK_ANCHOR *optargs, NODE *node_args)
|
|||
else if (args->kw_rest_arg) {
|
||||
iseq->arg_keyword = get_dyna_var_idx_at_raw(iseq, args->kw_rest_arg->nd_vid);
|
||||
COMPILE(optargs, "kwarg", args->kw_rest_arg);
|
||||
iseq->arg_keyword_check = (args->kw_rest_arg->nd_vid & ID_SCOPE_MASK) == ID_JUNK;
|
||||
ADD_INSN(optargs, nd_line(args->kw_rest_arg), pop);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -77,6 +77,9 @@ class TestSyntax < Test::Unit::TestCase
|
|||
eval("def o.m(k: 0) k end")
|
||||
end
|
||||
assert_equal(42, o.m(k: 42), '[ruby-core:45744]')
|
||||
bug7922 = '[ruby-core:52744] [Bug #7922]'
|
||||
def o.bug7922(**) end
|
||||
assert_nothing_raised(ArgumentError, bug7922) {o.bug7922(foo: 42)}
|
||||
end
|
||||
|
||||
def test_keyword_splat
|
||||
|
|
Загрузка…
Ссылка в новой задаче