sporkmonger / uuidtools

A simple universally unique ID generation library.
http://uuidtools.rubyforge.org/
Apache License 2.0
425 stars 63 forks source link

Deprecation Warning in Ruby 1.9.3 #9

Closed ReneB closed 12 years ago

ReneB commented 13 years ago

Hey sporkmonger,

Since 1.9.3 is out, and it has started printing pretty explicit warnings about deprecating Config in favor of RbConfig, I thought I'd go ahead and oblige. What do you think?

Regards, René van den Berg

sporkmonger commented 13 years ago

Code must work on 1.8.6, 1.8.7, and 1.9.x as well. Please verify that this change works in older versions and I'll go ahead and merge it. Otherwise please update code to check that the RbConfig constant exists and then branch to the appropriate snippet of code.

ReneB commented 13 years ago

RbConfig is an alias for Config since Ruby 1.8.5, so this should work. Testing in RVM:

$ irb -f
irb(main):001:0> RUBY_VERSION
=> "1.8.6"
irb(main):002:0> require 'rbconfig'
=> true
irb(main):003:0> RbConfig
=> Config
ReneB commented 12 years ago

Also, on Ruby 1.8.7:

$ irb -f
irb(main):001:0> RUBY_VERSION
=> "1.8.7"
irb(main):002:0> require 'rbconfig'
=> true
irb(main):003:0> RbConfig
=> Config
hemju commented 12 years ago

What's the status of this issue? Looks like there is already a fix for that warning, why hasn't it been released yet?

Altonymous commented 12 years ago

I too am looking for this to be released.

ReneB commented 12 years ago

I'm not sure. I think I've demonstrated that the change works on older versions as well, so I'm not sure if there's anything left for me to do. If there is, please let me know.

jrafanie commented 12 years ago

@sporkmonger Can you release a new version of the gem? rubygems.org still reports 2.1.2 as the latest version so this pull request/issue is still a problem. Also, pulls 6 and 8 are also not included in 2.1.2. Thanks!

sporkmonger commented 12 years ago

@jrafanie Done.

jrafanie commented 12 years ago

@sporkmonger Thanks!