[DRE-commits] [rails] 04/05: Drop patch applied upstream
Antonio Terceiro
terceiro at moszumanska.debian.org
Sat Apr 9 22:56:01 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository rails.
commit 9219ea1a148421fc499870bf2813dbc89edee89c
Author: Antonio Terceiro <terceiro at debian.org>
Date: Sat Apr 9 19:16:53 2016 -0300
Drop patch applied upstream
---
debian/changelog | 2 +
...wnMethods-merge-to-check-an-arg-is-a-Proc.patch | 66 ----------------------
debian/patches/series | 1 -
3 files changed, 2 insertions(+), 67 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 49ff4f4..06c01e1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ rails (2:4.2.6-1) UNRELEASED; urgency=medium
[ Antonio Terceiro ]
* New upstream release
* debian/clean: list files that are created when the tests run
+ * Drop 0003-Make-AR-SpawnMethods-merge-to-check-an-arg-is-a-Proc.patch,
+ applied upstream
[ Praveen Arimbrathodiyil ]
* Set minimum version of ruby-sprockets-rails (for sprockets version
diff --git a/debian/patches/0003-Make-AR-SpawnMethods-merge-to-check-an-arg-is-a-Proc.patch b/debian/patches/0003-Make-AR-SpawnMethods-merge-to-check-an-arg-is-a-Proc.patch
deleted file mode 100644
index d7149b0..0000000
--- a/debian/patches/0003-Make-AR-SpawnMethods-merge-to-check-an-arg-is-a-Proc.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From: yui-knk <spiketeika at gmail.com>
-Date: Wed, 11 Nov 2015 15:15:26 +0900
-Subject: Make `AR::SpawnMethods#merge!` to check an arg is a Proc
-
->From Ruby ( 2.3.0dev trunk 52520), `Hash#to_proc` is defined
-(https://github.com/ruby/ruby/commit/fbe967ec02cb65a7efa3fb8f3d747cf6f620dde1),
-and many tests have been failed with
-`ArgumentError: wrong number of arguments (given 0, expected 1)`.
-Because we call `Hash#to_proc` with no args in `#merge!`.
-
-This commit changes order of conditionals to not call `Hash#to_proc`.
-
-(cherry picked from commit a98475c2df8ab7d7d353cb29bb3f201c4c7eb9d1)
----
- activerecord/lib/active_record/relation/spawn_methods.rb | 10 +++++++---
- activerecord/test/cases/relation_test.rb | 7 +++++++
- 2 files changed, 14 insertions(+), 3 deletions(-)
-
-diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb
-index 57d66bc..6551344 100644
---- a/activerecord/lib/active_record/relation/spawn_methods.rb
-+++ b/activerecord/lib/active_record/relation/spawn_methods.rb
-@@ -12,6 +12,7 @@ module ActiveRecord
-
- # Merges in the conditions from <tt>other</tt>, if <tt>other</tt> is an <tt>ActiveRecord::Relation</tt>.
- # Returns an array representing the intersection of the resulting records with <tt>other</tt>, if <tt>other</tt> is an array.
-+ #
- # Post.where(published: true).joins(:comments).merge( Comment.where(spam: false) )
- # # Performs a single join query with both where conditions.
- #
-@@ -37,11 +38,14 @@ module ActiveRecord
- end
-
- def merge!(other) # :nodoc:
-- if !other.is_a?(Relation) && other.respond_to?(:to_proc)
-+ if other.is_a?(Hash)
-+ Relation::HashMerger.new(self, other).merge
-+ elsif other.is_a?(Relation)
-+ Relation::Merger.new(self, other).merge
-+ elsif other.respond_to?(:to_proc)
- instance_exec(&other)
- else
-- klass = other.is_a?(Hash) ? Relation::HashMerger : Relation::Merger
-- klass.new(self, other).merge
-+ raise ArgumentError, "#{other.inspect} is not an ActiveRecord::Relation"
- end
- end
-
-diff --git a/activerecord/test/cases/relation_test.rb b/activerecord/test/cases/relation_test.rb
-index 408953b..44e07a2 100644
---- a/activerecord/test/cases/relation_test.rb
-+++ b/activerecord/test/cases/relation_test.rb
-@@ -260,6 +260,13 @@ module ActiveRecord
- assert_equal 3, authors(:david).posts.merge(posts_with_special_comments_with_ratings).count.length
- end
-
-+ def test_merge_raises_with_invalid_argument
-+ assert_raises ArgumentError do
-+ relation = Relation.new(FakeKlass, :b)
-+ relation.merge(true)
-+ end
-+ end
-+
- class EnsureRoundTripTypeCasting < ActiveRecord::Type::Value
- def type
- :string
diff --git a/debian/patches/series b/debian/patches/series
index 98f6e58..e3a54f7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
0001-Be-careful-with-that-bundler.patch
0002-load_paths.rb-don-t-load-bundler.patch
-0003-Make-AR-SpawnMethods-merge-to-check-an-arg-is-a-Proc.patch
0004-ActiveRecord-adjust-test-suite-for-Debian-build.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/rails.git
More information about the Pkg-ruby-extras-commits
mailing list