summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/codepoints_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/codepoints_spec.rb')
-rw-r--r--spec/ruby/core/string/codepoints_spec.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/ruby/core/string/codepoints_spec.rb b/spec/ruby/core/string/codepoints_spec.rb
index 0b6cde82f7..4434eb66a5 100644
--- a/spec/ruby/core/string/codepoints_spec.rb
+++ b/spec/ruby/core/string/codepoints_spec.rb
@@ -1,7 +1,6 @@
-# -*- encoding: binary -*-
+# encoding: binary
require_relative '../../spec_helper'
require_relative 'shared/codepoints'
-require_relative 'shared/each_codepoint_without_block'
describe "String#codepoints" do
it_behaves_like :string_codepoints, :codepoints
@@ -11,8 +10,8 @@ describe "String#codepoints" do
end
it "raises an ArgumentError when no block is given if self has an invalid encoding" do
- s = "\xDF".force_encoding(Encoding::UTF_8)
- s.valid_encoding?.should be_false
- -> { s.codepoints }.should raise_error(ArgumentError)
+ s = "\xDF".dup.force_encoding(Encoding::UTF_8)
+ s.valid_encoding?.should == false
+ -> { s.codepoints }.should.raise(ArgumentError)
end
end
td> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2013-03-13fix typoskazu git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2012-12-13commit typo: remove file from r38358zzak git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2011-09-04Change encoding from EUC-JP to UTF-8. [Feature #5128]shyouhei git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2011-06-07* doc/irb/irb.rd: fix typo. patch by Nobuhiro IMAI.kosaki [Bug #4843] [ruby-dev:43639] * doc/irb/irb.rd.ja: ditto. * doc/ChangeLog-YARV: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2005-04-13 * doc/irb/irb.rd.ja: a lost of release IRB 0.9.5.keiju * lib/irb/slex.rb: bug fix by [ruby-core :04707]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e