Bug #6123

Properly gemify BigDecimal

Added by Vit Ondruch about 2 years ago. Updated about 2 years ago.

[ruby-core:43112]
Status:Rejected
Priority:Normal
Assignee:-
Category:-
Target version:-
ruby -v:ruby 1.9.3p0 (2011-10-30) [x86_64-linux] Backport:

Description

BigDecimal is available as a gem, however, the version in Ruby is crippled. It just tries to mimic gems, but it is not gem. So currently:

$ ruby -e "puts require('bigdecimal')"
true
$ ruby --disable-gems -e "puts require('bigdecimal')"
true

However, I would expect following behavior:

$ ruby -e "puts require('bigdecimal')"
true
$ ruby --disable-gems -e "puts require('bigdecimal')"
fail

The point is that the bigdecimal.so is still in Ruby's load path, although it should be managed by RubyGems if it is gem. Moreover, if the independent gem in RubyGems.org would be updated, it will never be used. Please consider fixing it.


Related issues

Related to ruby-trunk - Bug #6124: remove the "spec-only gems" in Ruby 1.9.3 (was What is th... Assigned 03/07/2012

History

#1 Updated by Vit Ondruch about 2 years ago

Better to say, the expected behavior is:

$ ruby --disable-gems -e "puts require('bigdecimal')"
-e:1:in require': cannot load such file -- bigdecimal (LoadError)
from -e:1:in
'

#2 Updated by Vit Ondruch about 2 years ago

Please note that I picked the BigDecimal just randomly. It applies to all other "gems" which are currently bundled in Ruby.

#3 Updated by Yui NARUSE about 2 years ago

  • Status changed from Open to Rejected

This is not only for bigdecimal but also io-console, json, minitest, psych, rake, and rdoc.
It is because they are not true gem, they are fake gem.

#4 Updated by Vit Ondruch about 2 years ago

Could you please enlighten me what is the purpose of fake gem then? Even if you install updated BigDecimal from rubygems.org, the bundled version will won unless you use "gem 'bidgecimal'" somewhere in the code. This makes no sense.

#5 Updated by Yui NARUSE about 2 years ago

Vit Ondruch wrote:

Could you please enlighten me what is the purpose of fake gem then? Even if you install updated BigDecimal from rubygems.org, the bundled version will won unless you use "gem 'bidgecimal'" somewhere in the code. This makes no sense.

It is another issue; could you make another ticket and assign it to Eric Hodel?

#6 Updated by Vit Ondruch about 2 years ago

Happily: #6124

Thank you.

Also available in: Atom PDF