aboutsummaryrefslogtreecommitdiffstats
path: root/lib/csv.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-22 06:34:27 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-22 06:34:27 +0000
commitaef88415856b8a3e1616ec2d9a2ec0d6fa855a3b (patch)
tree9e7152bf1dd21776c173a0959cdd864721f4ed3b /lib/csv.rb
parent4aa91c20eaf9b921eaacbc37c58378623e48e42b (diff)
downloadruby-aef88415856b8a3e1616ec2d9a2ec0d6fa855a3b.tar.gz
Fixed equality method fails when given the object that doesn't support table method.
[Bug #12422][ruby-core:75707] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/csv.rb')
-rw-r--r--lib/csv.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/csv.rb b/lib/csv.rb
index 45a087ff0f..b16e817d09 100644
--- a/lib/csv.rb
+++ b/lib/csv.rb
@@ -870,7 +870,8 @@ class CSV
# Returns +true+ if all rows of this table ==() +other+'s rows.
def ==(other)
- @table == other.table
+ return @table == other.table if other.is_a? CSV::Table
+ @table == other
end
#