diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-28 09:19:59 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-28 09:19:59 +0000 |
commit | 52d2636f3e7658f76136310359c2ba00e613d2bd (patch) | |
tree | 523a193924876ba20fe00debc3f45765fb21bd79 /spec/ruby/core/string | |
parent | c555bd7f01c531af8d33ed494b278a765381afd9 (diff) |
Update to ruby/spec@691755d
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/string')
-rw-r--r-- | spec/ruby/core/string/include_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/ruby/core/string/include_spec.rb b/spec/ruby/core/string/include_spec.rb index 8da12a9862..d7780de602 100644 --- a/spec/ruby/core/string/include_spec.rb +++ b/spec/ruby/core/string/include_spec.rb @@ -25,4 +25,11 @@ describe "String#include? with String" do lambda { "hello".include?('h'.ord) }.should raise_error(TypeError) lambda { "hello".include?(mock('x')) }.should raise_error(TypeError) end + + it "raises an Encoding::CompatibilityError if the encodings are incompatible" do + pat = "ア".encode Encoding::EUC_JP + lambda do + "あれ".include?(pat) + end.should raise_error(Encoding::CompatibilityError) + end end |