-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
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
Expanding with unused empty array values #88
Labels
Comments
gerwitz
changed the title
Empty array values fail
Expanding with unused empty array values
May 9, 2018
@gerwitz Could you provide minimal example for reproducing the failure? |
It's been a while and I hadn't discovered the
Note how removing the |
Thanks for the tips. |
namusyaka
added a commit
to namusyaka/mustermann19
that referenced
this issue
Nov 3, 2018
The previous code led regular error to be hidden and return meaningless ArgumentError. In order to avoid that, this commit makes code not use adjusted values for reporting error, use original values instead. Fixes sinatra#88
namusyaka
added a commit
to namusyaka/mustermann19
that referenced
this issue
Nov 3, 2018
The previous code led regular error to be hidden and return meaningless ArgumentError. In order to avoid that, this commit makes code not use adjusted values for reporting error, use original values instead. Fixes sinatra#88
👍 My tests get proper errors now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Passing in an unused value that is an empty array causes an entertaining failure.
Expander.expand()
replaces the corresponding key with an empty array:mustermann/mustermann/lib/mustermann/ast/expander.rb
Line 95 in 3409395
Then the mapping throws an error, which is "handled" by
Expander.error_for()
which attempts to sort the keys, naturally causing "ArgumentError - comparison of Symbol with Array"The text was updated successfully, but these errors were encountered: