Skip to content

Commit 3a8682f

Browse files
committed
fix: ruby 2.x compat
1 parent a03c6c5 commit 3a8682f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/rapid/defineable.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ def name(new_name = nil)
4242
# the DSL supoprts it.
4343
def method_missing(name, *args, **kwargs, &block)
4444
if definition.dsl.respond_to?(name)
45-
definition.dsl.send(name, *args, **kwargs, &block)
45+
if kwargs.empty?
46+
definition.dsl.send(name, *args, &block)
47+
else
48+
definition.dsl.send(name, *args, **kwargs, &block)
49+
end
4650
else
4751
super
4852
end

0 commit comments

Comments
 (0)