lib/ruby-conf.rb in ruby-conf-2.1.0 vs lib/ruby-conf.rb in ruby-conf-2.2.0

- old
+ new

@@ -4,11 +4,11 @@ module Magic attr_accessor :__rc_chain def __rc_gather() "#{to_s}#{__rc_chain.nil? ? "" : " #{__rc_chain.__rc_gather}"}" end end -class RubyConf < Object +class RubyConf < BasicObject @@__rc_configs = {} class Config attr_reader :__rc_attributes, :__rc_parent, :__rc_name, :__rc_chains, :__rc_locked @@ -138,10 +138,10 @@ @@__rc_configs[name.to_sym] = config unless name.nil? const = options.fetch(:as, name) if const && const.to_s[/^[A-Z]/] const = const.to_sym - Object.const_set(const, config) if !Object.const_defined?(const) || Object.const_get(const).is_a?(Config) + ::Object.const_set(const, config) if !::Object.const_defined?(const) || ::Object.const_get(const).is_a?(Config) end config end def self.[](name) @@__rc_configs[name.to_sym] end