Skip to content

Commit 732d323

Browse files
committedDec 1, 2014
Raise ArgumentError for missing keyword args
1 parent bf67f94 commit 732d323

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/opal/nodes/def.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def compile_keyword_args
126126
line " $kwargs = $hash2([], {});"
127127
line "}"
128128
line "if (!$kwargs.$$is_hash) {"
129-
line " throw new Error('expecting keyword args');"
129+
line " throw Opal.ArgumentError.$new('expecting keyword args');"
130130
line "}"
131131

132132
@kwargs.each do |kwarg|

0 commit comments

Comments
 (0)
Please sign in to comment.