Somewhat better for symbols.
authorPete Elmore <pete@debu.gs>
Fri, 9 Nov 2012 00:30:01 +0000 (16:30 -0800)
committerPete Elmore <pete@debu.gs>
Fri, 9 Nov 2012 00:30:01 +0000 (16:30 -0800)
lib/watts.rb

index a6d898581beaaec24abbd81d45f85afedb8c202a..84452a116cdeb15d63cdedc147b483c667ed416d 100644 (file)
@@ -211,7 +211,7 @@ module Watts
                HTTPMethods.each { |http_method|
                        define_singleton_method(http_method) { |&b|
                                (http_methods << http_method.to_s.upcase).uniq!
-                               bmname = "__#{http_method}".to_sym
+                               bmname = :"__#{http_method}"
                                define_method(bmname, &b)
                                define_method(http_method) { |*args|
                                        begin