summaryrefslogtreecommitdiff
path: root/spec/ruby/core/matchdata/shared/length.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/matchdata/shared/length.rb')
-rw-r--r--spec/ruby/core/matchdata/shared/length.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/ruby/core/matchdata/shared/length.rb b/spec/ruby/core/matchdata/shared/length.rb
new file mode 100644
index 0000000000..6312a7ed4c
--- /dev/null
+++ b/spec/ruby/core/matchdata/shared/length.rb
@@ -0,0 +1,5 @@
+describe :matchdata_length, shared: true do
+ it "length should return the number of elements in the match array" do
+ /(.)(.)(\d+)(\d)/.match("THX1138.").send(@method).should == 5
+ end
+end