Skip to content

Commit d9d6402

Browse files
committed
Also pass keyword arguments from method_missing to instruction.
1 parent a395f7c commit d9d6402

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/ronin/asm/program.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,14 +543,17 @@ def assemble(output, syntax: :intel, format: :bin)
543543
# @param [Array] arguments
544544
# Additional operands.
545545
#
546-
def method_missing(name,*arguments,&block)
547-
if (block && arguments.empty?)
546+
# @param [Hash{Symbol => Object}] kwargs
547+
# Additional keyword arguments.
548+
#
549+
def method_missing(name,*arguments,**kwargs,&block)
550+
if (block && arguments.empty? && kwargs.empty?)
548551
label(name,&block)
549552
elsif block.nil?
550553
if (arguments.empty? && register?(name))
551554
register(name)
552555
else
553-
instruction(name,*arguments)
556+
instruction(name,*arguments,**kwargs)
554557
end
555558
else
556559
super(name,*arguments,&block)

0 commit comments

Comments
 (0)