[ruby/private-ruby-2.3: 3/3] Upgrade to Ruby 2.3.0 (r49485).
Vít Ondruch
vondruch at fedoraproject.org
Tue Feb 3 15:21:40 UTC 2015
commit 2d95badf6a181e608d713c1603b6f9ef14f80b4c
Author: Vít Ondruch <vondruch at redhat.com>
Date: Tue Feb 3 14:43:14 2015 +0100
Upgrade to Ruby 2.3.0 (r49485).
...-NameError-when-refined-method-is-removed.patch | 92 ++++++++++++++++++++
ruby.spec | 17 +++-
2 files changed, 104 insertions(+), 5 deletions(-)
---
diff --git a/ruby-2.3.0-Revert-raise-NameError-when-refined-method-is-removed.patch b/ruby-2.3.0-Revert-raise-NameError-when-refined-method-is-removed.patch
new file mode 100644
index 0000000..bfbfe38
--- /dev/null
+++ b/ruby-2.3.0-Revert-raise-NameError-when-refined-method-is-removed.patch
@@ -0,0 +1,92 @@
+diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb
+index cb7c53f..df16254 100644
+--- a/test/ruby/test_refinement.rb
++++ b/test/ruby/test_refinement.rb
+@@ -1310,58 +1310,6 @@ class TestRefinement < Test::Unit::TestCase
+ end;
+ end
+
+- def test_remove_refined_method
+- assert_separately([], <<-"end;")
+- bug10765 = '[ruby-core:67722] [Bug #10765]'
+-
+- class C
+- def foo
+- "C#foo"
+- end
+- end
+-
+- module RefinementBug
+- refine C do
+- def foo
+- "RefinementBug#foo"
+- end
+- end
+- end
+-
+- using RefinementBug
+-
+- class C
+- remove_method :foo
+- end
+-
+- assert_equal("RefinementBug#foo", C.new.foo, bug10765)
+- end;
+- end
+-
+- def test_remove_undefined_refined_method
+- assert_separately([], <<-"end;")
+- bug10765 = '[ruby-core:67722] [Bug #10765]'
+-
+- class C
+- end
+-
+- module RefinementBug
+- refine C do
+- def foo
+- end
+- end
+- end
+-
+- using RefinementBug
+-
+- assert_raise(NameError, bug10765) {
+- class C
+- remove_method :foo
+- end
+- }
+- end;
+- end
+-
+ private
+
+ def eval_using(mod, s)
+diff --git a/vm_method.c b/vm_method.c
+index 8ad2b72..b2cff6f 100644
+--- a/vm_method.c
++++ b/vm_method.c
+@@ -766,12 +766,10 @@ remove_method(VALUE klass, ID mid)
+
+ if (!st_lookup(RCLASS_M_TBL(klass), mid, &data) ||
+ !(me = (rb_method_entry_t *)data) ||
+- (!me->def || me->def->type == VM_METHOD_TYPE_UNDEF) ||
+- UNDEFINED_REFINED_METHOD_P(me->def)) {
++ (!me->def || me->def->type == VM_METHOD_TYPE_UNDEF)) {
+ rb_name_error(mid, "method `%"PRIsVALUE"' not defined in %"PRIsVALUE,
+ rb_id2str(mid), rb_class_path(klass));
+ }
+-
+ key = (st_data_t)mid;
+ st_delete(RCLASS_M_TBL(klass), &key, &data);
+
+@@ -779,10 +777,6 @@ remove_method(VALUE klass, ID mid)
+ rb_clear_method_cache_by_class(klass);
+ rb_unlink_method_entry(me);
+
+- if (me->def->type == VM_METHOD_TYPE_REFINED) {
+- rb_add_refined_method_entry(klass, mid);
+- }
+-
+ CALL_METHOD_HOOK(self, removed, mid);
+ }
+
diff --git a/ruby.spec b/ruby.spec
index 726c45e..7200112 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -1,5 +1,5 @@
%global major_version 2
-%global minor_version 2
+%global minor_version 3
%global teeny_version 0
%global major_minor_version %{major_version}.%{minor_version}
@@ -10,7 +10,7 @@
#%%global milestone rc1
# Keep the revision enabled for pre-releases from SVN.
-#%%global revision 48936
+%global revision 49485
%global ruby_archive %{name}-%{ruby_version}
@@ -34,15 +34,15 @@
# http://redmine.ruby-lang.org/issues/5313
%global irb_version %{ruby_version}
-%global bigdecimal_version 1.2.6
+%global bigdecimal_version 1.2.7
%global io_console_version 0.4.3
%global json_version 1.8.1
%global minitest_version 5.4.3
%global power_assert_version 0.2.2
-%global psych_version 2.0.8
+%global psych_version 2.0.12
%global rake_version 10.4.2
%global rdoc_version 4.2.0
-%global test_unit_version 3.0.8
+%global test_unit_version 3.0.9
# Might not be needed in the future, if we are lucky enough.
# https://bugzilla.redhat.com/show_bug.cgi?id=888262
@@ -107,6 +107,9 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch
# in support for ABRT.
# http://bugs.ruby-lang.org/issues/8566
Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
+# Temporary revert, since this breaks test suite.
+# https://bugs.ruby-lang.org/issues/10765
+Patch7: ruby-2.3.0-Revert-raise-NameError-when-refined-method-is-removed.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: ruby(rubygems) >= %{rubygems_version}
@@ -405,6 +408,7 @@ rm -rf ext/fiddle/libffi*
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
# Provide an example of usage of the tapset:
cp -a %{SOURCE3} .
@@ -891,6 +895,9 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libdir}/tkextlib
%changelog
+* Tue Feb 03 2015 Vít Ondruch <vondruch at redhat.com> - 2.3.0-0.5.r49485
+- Upgrade to Ruby 2.3.0 (r49485).
+
* Tue Feb 03 2015 Vít Ondruch <vondruch at redhat.com> - 2.2.0-5
- Make operating_system.rb more robust.
- Add RubyGems stub headers for bundled gems.
More information about the scm-commits
mailing list