Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Tidy up code that selects the constants.

  • Loading branch information...
commit 4971bd46bd81c7b46d82bcd8191044889344d815 1 parent 97eebc7
Ryan Bigg authored January 29, 2009

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  leaves/logga/controller.rb
4  leaves/logga/controller.rb
@@ -145,8 +145,10 @@ def find_method(stem, sender, reply_to, name, constant=nil, opts={})
145 145
     methods = @methods.select { |m| m.first == name}
146 146
     methods = @methods.select { |m| /#{name}.*/.match(m.first) } if methods.empty?
147 147
     methods = @methods.select { |m| Regexp.new(name.split("").join(".*")).match(m.first) } if methods.empty?   
  148
+    
148 149
     if constant
149  
-      methods = methods.select { |m| /#{constants.join("|")}/.match(m[1]) }
  150
+      constants.map! { |c| "\(#{c.first}\)"}
  151
+      methods = methods.select { |m| constants.include?(m[1])}
150 152
     end
151 153
     count = 0
152 154
     if methods.size == 1

0 notes on commit 4971bd4

Please sign in to comment.
Something went wrong with that request. Please try again.