Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mash and object_id #73

Closed
net1957 opened this issue Feb 2, 2013 · 1 comment
Closed

Mash and object_id #73

net1957 opened this issue Feb 2, 2013 · 1 comment

Comments

@net1957
Copy link

net1957 commented Feb 2, 2013

on ruby 1.9.3 and latest Hashie I get this message :
hashie/mash.rb:80: warning: redefining `object_id' may cause serious problems

This happend in irb or with rubymine

Seems to work but affect debugging in Rubymine

If i'm only using mash, suppressing this method seems not to affect the program;

So I need a little help

my code is

# encoding: utf-8

require 'hashie/mash'

class AppConfig

  class ConfigError < StandardError;
  end

  attr_reader :config
  # load the configuration file
  def initialize(env)
    @config = Hashie::Mash.new YAML::load_file(File.join(APP_ROOT, 'config.yml'))[env]
    unless @config
      App.log("Environment '#{env}' not found in config file. Aborting!", Logger::FATAL)
      raise ConfigError
    end
  end

end
@jch
Copy link
Contributor

jch commented Feb 13, 2013

Thanks for reporting this. I plan to fix this in the 2.0.0 version of the gem. See #77

@jch jch closed this as completed Feb 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants