Skip to content

Instantly share code, notes, and snippets.

@ferrous26
Created February 10, 2012 05:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ferrous26/1786903 to your computer and use it in GitHub Desktop.
Save ferrous26/1786903 to your computer and use it in GitHub Desktop.
MacRuby does not use Syck
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index e873923..392c91b 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1921,12 +1921,12 @@ class Gem::Specification
end
def to_yaml(opts = {}) # :nodoc:
- if YAML.const_defined?(:ENGINE) && !YAML::ENGINE.syck? then
+ # XXX MACRUBY does not have syck, but does not have YAML::ENGINE either
+ #if YAML.const_defined?(:ENGINE) && !YAML::ENGINE.syck? then
+ if true then
super.gsub(/ !!null \n/, " \n")
else
- # XXX MACRUBY our quick_emit is different than syck
- #YAML.quick_emit object_id, opts do |out|
- YAML.quick_emit nil do |out|
+ YAML.quick_emit object_id, opts do |out|
out.map taguri, to_yaml_style do |map|
encode_with map
end
@ferrous26
Copy link
Author

Output from trying to make a gem

 ± rake gem
(in /Users/mrada/Developer/AXElements)
rake aborted!
unsupported YAML output type Hash

(See full trace by running task with --trace)
[1]    57924 exit 1     noglob rake gem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment