Skip to content

Commit

Permalink
[Specification] Ensure that yaml has been required
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed Dec 2, 2013
1 parent 4ed00ac commit 1b77aa3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/cocoapods-core/specification/yaml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module YAMLSupport
# @return [String] the yaml representation of the specification.
#
def to_yaml
require 'yaml'
to_hash.to_yaml
end

Expand Down Expand Up @@ -57,6 +58,7 @@ def self.from_hash(hash, parent = nil)
# @return [Specification] the specification
#
def self.from_yaml(yaml)
require 'yaml'
hash = YAML.load(yaml)
from_hash(hash)
end
Expand Down

0 comments on commit 1b77aa3

Please sign in to comment.