Skip to content
Browse files

Allow Program#method_missing to call #label if there is a block and n…

…o arguments.
  • Loading branch information...
1 parent b3257e7 commit 56f5e833086778a4bad66963aea4e34e6cf4a427 @postmodern postmodern committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/ronin/code/asm/program.rb
View
4 lib/ronin/code/asm/program.rb
@@ -199,7 +199,9 @@ def assemble(options={})
# Additional operands.
#
def method_missing(name,*arguments,&block)
- unless block
+ if (block && arguments.empty?)
+ label(name,&block)
+ elsif block.nil?
instruction(name,*arguments)
else
super(name,*arguments,&block)

0 comments on commit 56f5e83

Please sign in to comment.
Something went wrong with that request. Please try again.