[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sup-devel] [PATCH] implement const_missing for Index



Otherwise, constant references to LockError and ParseError will fail.
---
This should be added to the ruby-1.9-encoding branch.

 lib/sup/index.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/sup/index.rb b/lib/sup/index.rb
index f02c96b..8a4b8f2 100644
--- a/lib/sup/index.rb
+++ b/lib/sup/index.rb
@@ -234,6 +234,7 @@ class Index
 
   def self.instance; @obj end
   def self.method_missing m, *a, &b; @obj.send(m, *a, &b) end
+  def self.const_missing x; @obj.class.const_get(x) end
 end
 
 end
-- 
1.6.3.3

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel