We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Excuse me, I'd like to know if this is a specification for mruby or not.
When I executed below code, mruby raises exception.
Code:
def foo(bar) p bar end foo :var1 => :a
Output:
trace (most recent call last): [1] ..\..\scripts\test2.rb:5 ..\..\scripts\test2.rb:1:in foo: wrong number of arguments (given 1, expected 1) (ArgumentError)
However, in ruby 3.2.0, it works
Output (ruby 3.2.0):
{"var1"=>"a"}
Is this behavior mruby's specification?
The text was updated successfully, but these errors were encountered:
It's a bug. But I recommend wrapping hash arguments with braces, e.g. foo({:var1=>:a}), to disambiguate with keyword arguments.
foo({:var1=>:a})
Sorry, something went wrong.
Thank you for response. I understood my code is ambiguate and revised my code with your suggestion, then it works fine. Thank you very much :)
It's still a bug to be fixed.
f1ffedc
No branches or pull requests
Excuse me, I'd like to know if this is a specification for mruby or not.
When I executed below code, mruby raises exception.
Code:
Output:
However, in ruby 3.2.0, it works
Output (ruby 3.2.0):
Is this behavior mruby's specification?
The text was updated successfully, but these errors were encountered: