diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-12 13:44:58 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-12 13:44:58 +0000 |
commit | 30e14294a74915ab359de5bc45881c391e259c4c (patch) | |
tree | 19e9c0b233bd47450f92b5478ddfdbd81f7c7b88 /lib/csv.rb | |
parent | 232b4c20735aad320554d609b71c7a911c991abe (diff) |
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@5177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/csv.rb')
-rw-r--r-- | lib/csv.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/csv.rb b/lib/csv.rb index 10c86f6417..cfc5489ea0 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 |