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 | |
| 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')
| -rw-r--r-- | spec/ruby/core/io/select_spec.rb | 1 | ||||
| -rw-r--r-- | spec/ruby/core/string/include_spec.rb | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/core/io/select_spec.rb b/spec/ruby/core/io/select_spec.rb index aa1199c03b..eba8519e5b 100644 --- a/spec/ruby/core/io/select_spec.rb +++ b/spec/ruby/core/io/select_spec.rb @@ -108,6 +108,7 @@ describe "IO.select when passed nil for timeout" do end Thread.pass while t.status && t.status != "sleep" + t.join unless t.status t.status.should == "sleep" t.kill t.join 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 |
