lib/weskit/wml/attribute.rb in weskit-0.3.3 vs lib/weskit/wml/attribute.rb in weskit-0.3.4
- old
+ new
@@ -45,17 +45,17 @@
def convert object
string = object.to_s.strip
object = case string
- when %r{^nil|null$} then nil
- when %r{^true|yes$} then true
- when %r{^false|no$} then false
+ when %r{^(nil|null)$} then nil
+ when %r{^(true|yes)$} then true
+ when %r{^(false|no)$} then false
when %r{^[0-9]*\.[0-9]+$} then Float string
when %r{^[0-9]+$} then Integer string
else string
end
object.attr = self ; object
end
end
-end
\ No newline at end of file
+end