diff --git a/lib/sxp/reader/common_lisp.rb b/lib/sxp/reader/common_lisp.rb index 824acbd..7ca59e9 100644 --- a/lib/sxp/reader/common_lisp.rb +++ b/lib/sxp/reader/common_lisp.rb @@ -79,7 +79,7 @@ def read_atom when DECIMAL then Float(buffer) # FIXME? when INTEGER then Integer(buffer) when /^t$/i then true - when /^nil$/i then false + when /^nil$/i then nil else buffer.to_sym end end diff --git a/spec/common_lisp_spec.rb b/spec/common_lisp_spec.rb index 50d259e..4413ad2 100644 --- a/spec/common_lisp_spec.rb +++ b/spec/common_lisp_spec.rb @@ -80,8 +80,8 @@ { 't' => true, 'T' => true, - 'nil' => false, - 'NIL' => false, + 'nil' => nil, + 'NIL' => nil, '1/2' => Rational(1, 2), '1.0' => Float(1.0), "10" => Integer(10),