summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-ruby/power_assert/files/power_assert-0.2.6-ruby23-tests.patch53
-rw-r--r--dev-ruby/power_assert/power_assert-0.2.6.ebuild4
2 files changed, 56 insertions, 1 deletions
diff --git a/dev-ruby/power_assert/files/power_assert-0.2.6-ruby23-tests.patch b/dev-ruby/power_assert/files/power_assert-0.2.6-ruby23-tests.patch
new file mode 100644
index 000000000000..39aee08396c2
--- /dev/null
+++ b/dev-ruby/power_assert/files/power_assert-0.2.6-ruby23-tests.patch
@@ -0,0 +1,53 @@
+From b1bf60605303a4d60fd398fb75e04e4ff1568b0d Mon Sep 17 00:00:00 2001
+From: Kazuki Tsujimoto <kazuki@callcc.net>
+Date: Sat, 26 Dec 2015 17:57:03 +0900
+Subject: [PATCH] Encoding::CompatibilityError is no longer raised as of ruby
+ 2.3.0
+
+---
+ test/test_power_assert.rb | 31 +++++++++++--------------------
+ 1 file changed, 11 insertions(+), 20 deletions(-)
+
+diff --git a/test/test_power_assert.rb b/test/test_power_assert.rb
+index 272b8d1..863f8cc 100644
+--- a/test/test_power_assert.rb
++++ b/test/test_power_assert.rb
+@@ -345,27 +345,18 @@ def test_inspection_failure
+ assertion_message { BasicObjectSubclass.new.foo }
+
+
+- verbose = $VERBOSE
+- default_external = Encoding.default_external
+- default_internal = Encoding.default_internal
+- begin
+- $VERBOSE = nil
+- Encoding.default_external = 'cp932'
+- Encoding.default_internal = 'utf-8'
+- ary = ["\u3042"]
+- assert_match Regexp.new(<<END.chomp.gsub('|', "\\|")), assertion_message {
+- ary.length
+- | |
+- | 1
+- InspectionFailure: Encoding::CompatibilityError: .*
+-END
+- ary.length
+- }
+- ensure
+- Encoding.default_internal = default_internal
+- Encoding.default_external = default_external
+- $VERBOSE = verbose
++ o = Object.new
++ def o.inspect
++ raise
+ end
++ assert_equal <<END.chomp.b, assertion_message {
++ o.class
++ | |
++ | Object
++ InspectionFailure: RuntimeError:
++END
++ o.class
++ }
+ end
+
+ def test_assertion_message_with_incompatible_encodings
diff --git a/dev-ruby/power_assert/power_assert-0.2.6.ebuild b/dev-ruby/power_assert/power_assert-0.2.6.ebuild
index 4b6cc803590c..428732999b32 100644
--- a/dev-ruby/power_assert/power_assert-0.2.6.ebuild
+++ b/dev-ruby/power_assert/power_assert-0.2.6.ebuild
@@ -3,7 +3,7 @@
# $Id$
EAPI=5
-USE_RUBY="ruby20 ruby21 ruby22"
+USE_RUBY="ruby20 ruby21 ruby22 ruby23"
RUBY_FAKEGEM_RECIPE_DOC="rdoc"
RUBY_FAKEGEM_EXTRADOC="README.rdoc"
@@ -19,6 +19,8 @@ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86
SLOT="0"
IUSE=""
+RUBY_PATCHES=( ${P}-ruby23-tests.patch )
+
all_ruby_prepare() {
sed -i -e '/bundler/d' Rakefile || die
}