Skip to content

Commit

Permalink
Fix YAML hash parsing and 1.9 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
avit committed Mar 24, 2014
1 parent f23cbc2 commit 2d88c80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/ice_cube/parsers/yaml_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def initialize(yaml)
@hash = YAML::load(yaml)
yaml.match(SERIALIZED_START) do |match|
start_time = hash[:start_time] || hash[:start_date]
hash = FlexibleHash.new(@hash)
TimeUtil.restore_deserialized_offset start_time, match[:tz]
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/examples/to_yaml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ module IceCube

symbol_yaml = Schedule.from_hash(symbol_data).to_yaml
string_yaml = Schedule.from_hash(string_data).to_yaml
symbol_yaml.should == string_yaml
YAML.load(symbol_yaml).should == YAML.load(string_yaml)
end

end
Expand Down

0 comments on commit 2d88c80

Please sign in to comment.