diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-07 08:28:42 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-09-07 08:28:42 +0000 |
commit | f2bd0ce9933be0d7a9c94a5f1b41f85f75eff6a6 (patch) | |
tree | a27a6bb559574d85ecab8992388bb3f5842a95dc | |
parent | 5a883a2cf45d582e407fce9931d6c954a3786c3f (diff) |
* lib/yaml.rb: explicitly specify ::Object to avoid the collision with
Syck::Object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/yaml.rb | 2 | ||||
-rw-r--r-- | test/syck/test_yaml.rb | 1 |
3 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Sep 7 17:27:18 2011 NARUSE, Yui <[email protected]> + + * lib/yaml.rb: explicitly specify ::Object to avoid the collision with + Syck::Object. + Tue Sep 6 21:06:49 2011 Shota Fukumori <[email protected]> * lib/test/unit.rb (_run_suites): Now reports are written the diff --git a/lib/yaml.rb b/lib/yaml.rb index ff9e1a6344..6ae71fb1dc 100644 --- a/lib/yaml.rb +++ b/lib/yaml.rb @@ -30,7 +30,7 @@ module YAML require engine unless (engine == 'syck' ? Syck : Psych).const_defined?(:VERSION) - Object.class_eval <<-eorb, __FILE__, __LINE__ + 1 + ::Object.class_eval <<-eorb, __FILE__, __LINE__ + 1 remove_const 'YAML' YAML = #{engine.capitalize} remove_method :to_yaml diff --git a/test/syck/test_yaml.rb b/test/syck/test_yaml.rb index 7edf79dbe6..f980a75c9c 100644 --- a/test/syck/test_yaml.rb +++ b/test/syck/test_yaml.rb @@ -3,6 +3,7 @@ # $Id$ # require 'test/unit' +require 'syck' require 'yaml' require 'syck/ypath' |