Skip to content

Commit

Permalink
Silence deprecation warnings during spec loading
Browse files Browse the repository at this point in the history
  • Loading branch information
evanphx committed May 17, 2011
1 parent 2786a40 commit 26741a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/rubygems/specification.rb
Expand Up @@ -536,7 +536,11 @@ def self.load file
code.untaint

begin
spec = eval code, binding, file
spec = nil

Deprecate.skip_during do
spec = eval code, binding, file
end

if Gem::Specification === spec
spec.loaded_from = file.to_s
Expand Down

1 comment on commit 26741a1

@argent-smith
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to ask them to silence all deprecation by some flag. I had to rewrite some of my backgrounding scripts because of that deprecation messages on $std-everything.

Please sign in to comment.