lib/lisp/interpreter/core/object.rb in lisp-interpreter-0.5.1 vs lib/lisp/interpreter/core/object.rb in lisp-interpreter-0.5.2
- old
+ new
@@ -4,11 +4,11 @@
to_f.to_s == to_s || to_i.to_s == to_s
end
def to_num
return to_f if to_f.to_s == to_s
- return to_i if to_i.to_s == to_s
+ to_i if to_i.to_s == to_s
end
def character?
return true if self == '#\space'
(start_with? '#\\') && (('a'..'z').to_a.include? self[2]) && size == 3
@@ -30,11 +30,10 @@
return true if res[-3] == '.'
list? && !res[2..-2].empty?
end
def quote?
- return true if start_with? '\''
- false
+ start_with? '\''
end
def boolean?
['#t', '#f'].include? self
end