lib/lisp/interpreter/core/object.rb in lisp-interpreter-0.5.0 vs lib/lisp/interpreter/core/object.rb in lisp-interpreter-0.5.1
- old
+ new
@@ -40,11 +40,10 @@
['#t', '#f'].include? self
end
def type
fns = %w[list pair string number character boolean quote]
- res = fns.reject { |t| fns.index(t) unless send t + '?' }
- '<' + res[0] + '>'
+ fns.each { |t| return '<' + t + '>' if send t + '?' }
end
private
def object_split