[DRE-commits] [pry] 04/06: cherry-pick upstream patch to fix usage on Ruby 2.2
Antonio Terceiro
terceiro at moszumanska.debian.org
Wed Aug 19 23:04:08 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository pry.
commit 7b8d162a7bd35075a7b69ccb8cc31278f8e5df3e
Author: Antonio Terceiro <terceiro at debian.org>
Date: Thu Aug 20 00:33:55 2015 +0200
cherry-pick upstream patch to fix usage on Ruby 2.2
---
debian/changelog | 2 ++
debian/patches/fix-on-ruby2.2.patch | 37 +++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 40 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index b90eee4..6b3b80d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ pry (0.10.1-2) UNRELEASED; urgency=medium
* Team upload.
* Embed a copy of ruby-slop 3.x (Closes: #794657)
+ * debian/patches/fix-on-ruby2.2.patch: cherry-pick upstream patch to fix
+ usage on Ruby 2.2
-- Antonio Terceiro <terceiro at debian.org> Thu, 20 Aug 2015 00:20:40 +0200
diff --git a/debian/patches/fix-on-ruby2.2.patch b/debian/patches/fix-on-ruby2.2.patch
new file mode 100644
index 0000000..3ed0b1b
--- /dev/null
+++ b/debian/patches/fix-on-ruby2.2.patch
@@ -0,0 +1,37 @@
+From 74784e8f7889c3b8f0bb337f04b050e79a3df34a Mon Sep 17 00:00:00 2001
+From: Ryunosuke SATO <tricknotes.rs at gmail.com>
+Date: Tue, 14 Oct 2014 23:02:28 +0900
+Subject: [PATCH] Handle error about frozen object in Ruby 2.2
+
+This kind of error message seems to be updated in Ruby 2.2.
+
+For example, the following code throws an error that has different
+error message with Ruby version:
+```
+"".freeze.instance_eval do
+ def hi
+ end
+end
+```
+
+In Ruby 2.1.3:
+> RuntimeError: can't modify frozen Class
+
+In Ruby 2.2.0-preview1:
+> RuntimeError: can't modify frozen object
+---
+ lib/pry/exceptions.rb | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/pry/exceptions.rb b/lib/pry/exceptions.rb
+index 0204d84..080b72e 100644
+--- a/lib/pry/exceptions.rb
++++ b/lib/pry/exceptions.rb
+@@ -52,6 +52,7 @@ module FrozenObjectException
+ def self.===(exception)
+ ["can't modify frozen class/module",
+ "can't modify frozen Class",
++ "can't modify frozen object",
+ ].include?(exception.message)
+ end
+ end
diff --git a/debian/patches/series b/debian/patches/series
index 1e52c76..bac3323 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
0002-Modify-upstream-spec-for-Debian-Package.patch
dont-try-to-write-outside-build-dir
use-embedded-pry.patch
+fix-on-ruby2.2.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/pry.git
More information about the Pkg-ruby-extras-commits
mailing list