move to syms for names

This commit is contained in:
Torsten Ruger
2014-06-03 20:47:06 +03:00
parent b7c2089046
commit ca19f5cb16
12 changed files with 65 additions and 22 deletions

View File

@ -63,6 +63,7 @@ module Arm
# return the block of the given name
# or raise an exception, as this is meant to be called when the block is available
def get_block name
name = name.to_sym
block = @blocks.find {|b| b.name == name}
raise "No block found for #{name} (in #{blocks.collect{|b|b.name}.join(':')})" unless block
block