<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -52,12 +52,6 @@ class Function
   end
 
   def get_arg(a)
-    # if we have a method, let's check first,
-    # if the class scope has the argument defined.
-    if is_method?
-      return @cscope.get_arg(a)
-    end
-
     if a == :numargs
       # This is a bit of a hack, but it turns :numargs
       # into a constant for any non-variadic function
@@ -68,6 +62,12 @@ class Function
       return [arg.type, i] if arg.name == a
     end
 
+    # if we have a method, let's check first,
+    # if the class scope has the argument defined.
+    if is_method?
+      return @cscope.get_arg(a)
+    end
+
     return nil
   end
 end</diff>
      <filename>function.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3a52f2219f0851b9c5d42d2194bea5e0f692fedb</id>
    </parent>
  </parents>
  <author>
    <name>Vidar Hokstad</name>
    <email>vidar@hokstad.com</email>
  </author>
  <url>http://github.com/vidarh/writing-a-compiler-in-ruby/commit/0ff5298636656990273899b9c41eae999a258dbd</url>
  <id>0ff5298636656990273899b9c41eae999a258dbd</id>
  <committed-date>2009-04-25T04:25:36-07:00</committed-date>
  <authored-date>2009-04-25T04:25:36-07:00</authored-date>
  <message>Moved class scope lookup to the end, as otherwise it breaks function argument lookup</message>
  <tree>a7704f46957a99daa3c813fb81dcef1200f9c22f</tree>
  <committer>
    <name>Vidar Hokstad</name>
    <email>vidar@hokstad.com</email>
  </committer>
</commit>
