lib/dentaku/calculator.rb in dentaku-0.2.10 vs lib/dentaku/calculator.rb in dentaku-0.2.11

- old
+ new

@@ -29,11 +29,11 @@ if value @memory[key_or_hash.to_sym] = value else key_or_hash.each do |key, value| - @memory[key.to_sym] = value if value + @memory[key.to_sym] = value end end if block_given? result = yield @@ -67,9 +67,13 @@ end end end def type_for_value(value) - value.is_a?(String) ? :string : :numeric + case value + when String then :string + when TrueClass, FalseClass then :logical + else :numeric + end end end end