Skip to content

Commit

Permalink
Revert "Simplify Hash#to_ostruct"
Browse files Browse the repository at this point in the history
This reverts commit 1976bba.
  • Loading branch information
citizen428 committed Aug 13, 2012
1 parent 1cc93d6 commit afb4bca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/shenanigans/hash/to_ostruct.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def to_ostruct
when Hash
[k, v.to_ostruct]
when Array
[k, v.map(&:to_ostruct)]
[k, v.map { |el| Hash === el ? el.to_ostruct : el }]
else
[k, v]
end
Expand Down

0 comments on commit afb4bca

Please sign in to comment.