aboutsummaryrefslogtreecommitdiffstats
path: root/test/csv/test_row.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-17 01:58:34 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-17 01:58:34 +0000
commit96fb819676d401871b7cefd261ea7182684d6ff4 (patch)
tree13e1ec6d009725037a71f557c4492d49609d0e05 /test/csv/test_row.rb
parente5471cbe631cf2cb7949b46d480f68affdc29790 (diff)
downloadruby-96fb819676d401871b7cefd261ea7182684d6ff4.tar.gz
* lib/csv.rb: accept to use Range object for row selection.
[Feature #11267][ruby-dev:49091] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/csv/test_row.rb')
-rwxr-xr-xtest/csv/test_row.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/csv/test_row.rb b/test/csv/test_row.rb
index 3acceea234..a8aeb288fc 100755
--- a/test/csv/test_row.rb
+++ b/test/csv/test_row.rb
@@ -64,6 +64,9 @@ class TestCSV::Row < TestCSV
# by index
assert_equal(3, @row.field(2))
+ # by range
+ assert_equal([2,3], @row.field(1..2))
+
# missing
assert_nil(@row.field("Missing"))
assert_nil(@row.field(10))