Upgrade to Ruby 2.0.0 (r36887).
This commit is contained in:
parent
000d56dcb6
commit
7ef1432815
2 changed files with 57 additions and 4 deletions
46
ruby-2.0-r36832-rb_float_value-optimization.patch
Normal file
46
ruby-2.0-r36832-rb_float_value-optimization.patch
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
From 0b89d6d5f9f8c788f4391d8a0499f10aed624371 Mon Sep 17 00:00:00 2001
|
||||
From: ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
|
||||
Date: Mon, 27 Aug 2012 09:22:21 +0000
|
||||
Subject: [PATCH] * include/ruby/ruby.h (rb_float_value): optimize it. This
|
||||
technique was pointed by shinichiro.hamaji
|
||||
<http://shinh.skr.jp/m/?date=20120825#p02>.
|
||||
|
||||
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
||||
---
|
||||
ChangeLog | 6 ++++++
|
||||
include/ruby/ruby.h | 10 +++++-----
|
||||
2 files changed, 11 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
|
||||
index 3905b32..b8b2267 100644
|
||||
--- a/include/ruby/ruby.h
|
||||
+++ b/include/ruby/ruby.h
|
||||
@@ -733,10 +733,7 @@ struct RFloat {
|
||||
rb_float_value(VALUE v)
|
||||
{
|
||||
if (FLONUM_P(v)) {
|
||||
- if (v == (VALUE)0x8000000000000002) {
|
||||
- return 0.0;
|
||||
- }
|
||||
- else {
|
||||
+ if (v != (VALUE)0x8000000000000002) { /* LIKELY */
|
||||
union {
|
||||
double d;
|
||||
VALUE v;
|
||||
@@ -746,9 +743,12 @@ struct RFloat {
|
||||
/* e: xx1... -> 011... */
|
||||
/* xx0... -> 100... */
|
||||
/* ^b63 */
|
||||
- t.v = RUBY_BIT_ROTR(((b63 ^ 1) << 1) | b63 | (v & ~0x03), 3);
|
||||
+ t.v = RUBY_BIT_ROTR(2 - b63 | (v & ~0x03), 3);
|
||||
return t.d;
|
||||
}
|
||||
+ else {
|
||||
+ return 0.0;
|
||||
+ }
|
||||
}
|
||||
else {
|
||||
return ((struct RFloat *)v)->float_value;
|
||||
--
|
||||
1.7.10
|
||||
|
||||
15
ruby.spec
15
ruby.spec
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
# If revision is removed/commented out, the official release build is expected.
|
||||
# Keep the revision enabled for pre-releases from SVN.
|
||||
%global revision 36213
|
||||
%global revision 36887
|
||||
|
||||
%global release 1
|
||||
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
%global bigdecimal_version 1.1.0
|
||||
%global io_console_version 0.3
|
||||
%global json_version 1.7.1
|
||||
%global minitest_version 3.0.0
|
||||
%global minitest_version 3.3.0
|
||||
|
||||
%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/')
|
||||
|
||||
|
|
@ -90,6 +90,10 @@ Patch9: rubygems-1.8.11-binary-extensions.patch
|
|||
# Make mkmf verbose by default
|
||||
Patch12: ruby-1.9.3-mkmf-verbose.patch
|
||||
|
||||
# This patch breaks a test suite, so revert it for now.
|
||||
# https://bugs.ruby-lang.org/issues/6971
|
||||
Patch100: ruby-2.0-r36832-rb_float_value-optimization.patch
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: ruby(rubygems) >= %{rubygems_version}
|
||||
# Make the bigdecimal gem a runtime dependency of Ruby to avoid problems
|
||||
|
|
@ -322,6 +326,8 @@ Tcl/Tk interface for the object-oriented scripting language Ruby.
|
|||
%patch9 -p1
|
||||
%patch12 -p1
|
||||
|
||||
%patch100 -p1 -R
|
||||
|
||||
%build
|
||||
autoconf
|
||||
|
||||
|
|
@ -536,7 +542,6 @@ make check TESTS="-v $DISABLE_TESTS"
|
|||
%{ruby_libdir}/ripper
|
||||
%{ruby_libdir}/rss
|
||||
%{ruby_libdir}/shell
|
||||
%{ruby_libdir}/syck
|
||||
%{ruby_libdir}/syslog
|
||||
%{ruby_libdir}/test
|
||||
%exclude %{ruby_libdir}/tk
|
||||
|
|
@ -645,7 +650,6 @@ make check TESTS="-v $DISABLE_TESTS"
|
|||
%{ruby_libarchdir}/socket.so
|
||||
%{ruby_libarchdir}/stringio.so
|
||||
%{ruby_libarchdir}/strscan.so
|
||||
%{ruby_libarchdir}/syck.so
|
||||
%{ruby_libarchdir}/syslog.so
|
||||
%exclude %{ruby_libarchdir}/tcltklib.so
|
||||
%exclude %{ruby_libarchdir}/tkutil.so
|
||||
|
|
@ -725,6 +729,9 @@ make check TESTS="-v $DISABLE_TESTS"
|
|||
%{ruby_libdir}/tkextlib
|
||||
|
||||
%changelog
|
||||
* Mon Sep 03 2012 Vít Ondruch <vondruch@redhat.com> - 2.0.0.0-0.2.r36887
|
||||
- Upgrade to Ruby 2.0.0 (r36887).
|
||||
|
||||
* Mon Jun 11 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.0.0.0-0.1.r35922
|
||||
- Make the bigdecimal gem a runtime dependency of Ruby.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue