Permalink
Browse files

silence warnings for constant initialization

  • Loading branch information...
1 parent aebfafe commit 080f5343f80f50034f4d8495bfd79cd947d860cd @gnufied committed Sep 3, 2008
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/backgroundrb/bdrb_config.rb
@@ -24,7 +24,9 @@ def self.parse_cmd_options(argv)
def self.read_config(config_file)
config = YAML.load(ERB.new(IO.read(config_file)).result)
environment = ENV["RAILS_ENV"] || config[:backgroundrb][:environment] || "development"
- Object.const_set("RAILS_ENV",environment)
+ silence_warnings do
+ Object.const_set("RAILS_ENV",environment)
+ end
ENV["RAILS_ENV"] = environment
config
end

0 comments on commit 080f534

Please sign in to comment.