From 232af9efc706919b271b89824d3d546d208c6b90 Mon Sep 17 00:00:00 2001 From: nahi Date: Fri, 12 Dec 2003 13:44:58 +0000 Subject: * lib/csv.rb: add Cell#to_str and Cell#to_s for /.../ =~ aCell, "#{aCell}" and so on. * test/csv/test_csv.rb: add tests. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/csv.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/csv.rb') diff --git a/lib/csv.rb b/lib/csv.rb index 10c86f641..cfc5489ea 100644 --- a/lib/csv.rb +++ b/lib/csv.rb @@ -85,6 +85,20 @@ public @data == rhs.data end end + + def to_str + content.to_str + end + + def to_s + content.to_s + end + + private + + def content + @is_null ? nil : data + end end -- cgit