From 5539d8fe32f3a12e99b8174df55c19158197fab8 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Fri, 26 Jun 2015 20:35:16 +0300 Subject: [PATCH] just a little more precise --- lib/register/register_reference.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/register/register_reference.rb b/lib/register/register_reference.rb index 39975818..a2794c48 100644 --- a/lib/register/register_reference.rb +++ b/lib/register/register_reference.rb @@ -24,10 +24,12 @@ module Register end def self.look_like_reg is_it + return false unless is_it.is_a? Symbol if( [:lr , :pc].include? is_it ) return true end if( (is_it.to_s.length < 3) and (is_it.to_s[0] == "r")) + # could tighten this by checking that the rest is a number return true end return false