diff options
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 |
