<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -150,14 +150,18 @@ module RbPlusPlus
       # will fail because g++ can't find the enumeration.
       #
       # We work around this by checking if the argument is an Enumeration (above), then
-      # grabbing the appropriate EnumValue and printing it out
+      # grabbing the appropriate EnumValue and printing it out.
+      #
+      # Of course, there could be times we don't want to do this and just use the actual
+      # default value. See default_arguments_test and headers/default_arguments.h
+      # for an example.
       def fix_enumeration_value(enum, default_value)
         found =
           enum.values.select do |enum_value|
             enum_value.name == default_value
           end.first
 
-        found.qualified_name
+        found ? found.qualified_name : default_value
       end
 
     end</diff>
      <filename>lib/rbplusplus/builders/method_base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -72,4 +72,11 @@ context &quot;Default arguments properly exposed&quot; do
     modify(1, Ops::ADD).should.equal 11
     modify(1, Ops::REMOVE).should.equal -9
   end
+
+  # Ogre does this to handle some weird pass-back-enum-that-signals-error (Ogre::Frustum::isVisible)
+  specify &quot;properly handle incomplete enums arguments with straight integer default values&quot; do
+    modify2(1).should.equal 1
+    modify2(1, Ops::ADD).should.equal 1
+    modify2(1, Ops::REMOVE).should.equal 1
+  end
 end</diff>
      <filename>test/default_arguments_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -45,8 +45,8 @@ namespace default_args {
   };
 
   enum Ops {
-    ADD,
-    REMOVE
+    ADD    = 0,
+    REMOVE = 1
   };
 
   int modify(int value, Ops by = ADD) {
@@ -61,6 +61,11 @@ namespace default_args {
     return value;
   }
 
+  // Seen in Ogre3D
+  int modify2(int value, Ops* by = 0) {
+    return value;
+  }
+
 
 }
 </diff>
      <filename>test/headers/default_arguments.h</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3fc36e21a89508f13382e0d74452b28406632a67</id>
    </parent>
  </parents>
  <author>
    <name>Jason Roelofs</name>
    <email>jameskilton@gmail.com</email>
  </author>
  <url>http://github.com/jameskilton/rbplusplus/commit/d2efd311371f9079bed99104b4be2c40213ac027</url>
  <id>d2efd311371f9079bed99104b4be2c40213ac027</id>
  <committed-date>2009-10-28T11:09:51-07:00</committed-date>
  <authored-date>2009-10-28T11:09:51-07:00</authored-date>
  <message>Handle an odd case where the enum itself isn't being used for the default value of an argument, but the value of that enum entry</message>
  <tree>41c37f7e884fd652e621ce26a7760fad76e33592</tree>
  <committer>
    <name>Jason Roelofs</name>
    <email>jameskilton@gmail.com</email>
  </committer>
</commit>
