lib/gorillib/string/inflector.rb in gorillib-0.5.0 vs lib/gorillib/string/inflector.rb in gorillib-0.5.2
- old
+ new
@@ -112,10 +112,10 @@
# This is the extlib version of String#constantize, which has different
# behavior wrt using lexical context: see active_support/inflector/methods.rb
#
def constantize(str)
unless /\A(?:::)?([A-Z]\w*(?:::[A-Z]\w*)*)\z/ =~ str
- raise NameError, "#{self.inspect} is not a valid constant name!"
+ raise NameError, "#{str.inspect} is not a valid constant name!"
end
Object.module_eval("::#{$1}", __FILE__, __LINE__)
end