Ruby 1.8 can't regex on a symbol (or something)

This commit is contained in:
Thomas Reynolds 2013-05-23 14:55:26 -07:00
parent bcdaad6443
commit ed9012ef5b

View file

@ -127,7 +127,7 @@ module Middleman
def method_missing(method, *args) def method_missing(method, *args)
if defines_setting?(method) && args.size == 0 if defines_setting?(method) && args.size == 0
self[method] self[method]
elsif method =~ /^(\w+)=$/ && args.size == 1 elsif method.to_s =~ /^(\w+)=$/ && args.size == 1
self[$1.to_sym] = args[0] self[$1.to_sym] = args[0]
else else
super super