aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/regexp/match_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-11-30 21:26:52 +0100
committerBenoit Daloze <eregontp@gmail.com>2019-11-30 21:26:52 +0100
commit1243255c3a36433041012b6107a5ac48658a0895 (patch)
tree04440f84b48999ff08d4a2a16d066d0ad731400e /spec/ruby/core/regexp/match_spec.rb
parentab8345271eb87ff155d8bd5f22f53a4cf2902c26 (diff)
downloadruby-1243255c3a36433041012b6107a5ac48658a0895.tar.gz
Update to ruby/spec@4eec3dc
Diffstat (limited to 'spec/ruby/core/regexp/match_spec.rb')
-rw-r--r--spec/ruby/core/regexp/match_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/core/regexp/match_spec.rb b/spec/ruby/core/regexp/match_spec.rb
index 0ce8347d2d..f31b893f5e 100644
--- a/spec/ruby/core/regexp/match_spec.rb
+++ b/spec/ruby/core/regexp/match_spec.rb
@@ -38,6 +38,10 @@ describe "Regexp#match" do
-> { Regexp.allocate.match('foo') }.should raise_error(TypeError)
end
+ it "raises TypeError on an uninitialized Regexp" do
+ -> { Regexp.allocate.match('foo'.encode("UTF-16LE")) }.should raise_error(TypeError)
+ end
+
describe "with [string, position]" do
describe "when given a positive position" do
it "matches the input at a given position" do