Skip to content

Commit

Permalink
Simplify some logic
Browse files Browse the repository at this point in the history
  • Loading branch information
project-eutopia committed Jan 9, 2018
1 parent d250b60 commit 4a34bf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/keisan/ast/hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def to_s
def stringify_and_cellify!
@hash = ::Hash[
@hash.map do |key, val|
key = key.is_a?(AST::String) ? key.value : key
val = val.is_a?(Cell) ? val : Cell.new(val)
key = key.value if key.is_a?(AST::String)
val = Cell.new(val) unless val.is_a?(Cell)
[key, val]
end
]
Expand Down

0 comments on commit 4a34bf4

Please sign in to comment.