Issue #7344 has been updated by kou (Kouhei Sutou).


> The installed version of bigdecimal and the default gem version are the same, so the installed version can't be used:
>
> $ ruby20 -rbigdecimal -e 'p $".grep(/bigdecimal/)'
> ["/usr/local/lib/ruby/2.0.0/x86_64-darwin12.2.1/bigdecimal.bundle"]
>
> I don't know if this is a bug in RubyGems or not. kou, can you comment?

Umm... It is difficult... OK. It's a bug in RubyGems. We can fix it by the following change:

Index: specification.rb
===================================================================
--- specification.rb	(revision 38448)
+++ specification.rb	(working copy)
@@ -648,10 +648,10 @@
     unless defined?(@@all) && @@all then
 
       specs = {}
-      each_default do |spec|
+      each_normal do |spec|
         specs[spec.full_name] ||= spec
       end
-      each_normal do |spec|
+      each_default do |spec|
         specs[spec.full_name] ||= spec
       end
 

> I think we need more precise information to reproduce the issue that `gem install bigdecimal` is still failed on trunk. 

I think that install command on Mac OS X doesn't report error for the same source and destination file. Could you try the following commands?

  % touch a
  % install a a
  % echo $?

Here is the result on my Debian GNU/Linux:

  % touch a
  % install a a
  install: 'a' and 'a' are the same file
  % echo $?
  1

I think that install on Mac OS X returns 0 for "echo $?".
----------------------------------------
Bug #7344: gem pristine bigdecimal ???紊掩???????????障??
https://bugs.ruby-lang.org/issues/7344#change-34830

Author: hsbt (Hiroshi SHIBATA)
Status: Feedback
Priority: Normal
Assignee: drbrain (Eric Hodel)
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-11-13) [x86_64-darwin12.2.1]


gem pristine bigdecimal ???絎?茵?????????篁ヤ??????若????榊????????純?<?????障????障?????

% gem pristine bigdecimal
Restoring gems to pristine condition...
Building native extensions.  This could take a while...
ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

/Users/hsbt/.rbenv/versions/2.0.0-dev/bin/ruby extconf.rb
checking for labs() in stdlib.h... yes
checking for llabs() in stdlib.h... yes
creating Makefile

make
compiling bigdecimal.c
linking shared-object bigdecimal.bundle

make install
/usr/local/Cellar/coreutils/8.19/libexec/gnubin/install -c -m 0755 bigdecimal.bundle /Users/hsbt/.rbenv/versions/2.0.0-dev/lib/ruby/gems/2.0.0/gems/bigdecimal-1.1.0/.
/usr/local/Cellar/coreutils/8.19/libexec/gnubin/install: ???bigdecimal.bundle??? and ???/Users/hsbt/.rbenv/versions/2.0.0-dev/lib/ruby/gems/2.0.0/gems/bigdecimal-1.1.0/./bigdecimal.bundle??? are the same file
make: *** [install-so] Error 1

??????у??茵????????????????綵??帥?????????с???????? OS ??≪??????????若?????????? gem pristine --all ???絎?茵????????????? b ??у?????罩≪?障?c?????障?????у?違?c?????障?????


-- 
http://bugs.ruby-lang.org/