Search
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby
All Projects
Ruby
Overview
Activity
Roadmap
Issues
Repository
Like
Download (291 Bytes)
Bug #17727
ยป kwarg_bug.rb
colintherobot (Colin Hart)
, 03/17/2021 08:08 PM
def
foo
(
a
:,
**
b
)
[
a
,
b
]
end
## passing case
foo
(
a:
'a'
,
**
{
b:
1
})
foo
(
a:
'a'
,
**
{
b:
1
}
)
## failing case single line
foo
(
a:
'a'
,
{
b:
1
})
# SyntaxError: unexpected ')', expecting =>
## Failing case multi-line
foo
(
a:
'a'
,
{
b:
1
}
)
# SyntaxError: unexpected '\n', expecting =>
(1-1/1)
Loading...