summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/bytes_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/bytes_spec.rb')
-rw-r--r--spec/ruby/core/string/bytes_spec.rb26
1 files changed, 12 insertions, 14 deletions
diff --git a/spec/ruby/core/string/bytes_spec.rb b/spec/ruby/core/string/bytes_spec.rb
index e7d3a7fbd8..96f1ae9cf2 100644
--- a/spec/ruby/core/string/bytes_spec.rb
+++ b/spec/ruby/core/string/bytes_spec.rb
@@ -36,22 +36,20 @@ describe "String#bytes" do
end
end
-with_feature :encoding do
- describe "String#bytes" do
- before :each do
- @utf8 = "東京"
- @ascii = 'Tokyo'
- @utf8_ascii = @utf8 + @ascii
- end
+describe "String#bytes" do
+ before :each do
+ @utf8 = "東京"
+ @ascii = 'Tokyo'
+ @utf8_ascii = @utf8 + @ascii
+ end
- it "agrees with #getbyte" do
- @utf8_ascii.bytes.to_a.each_with_index do |byte,index|
- byte.should == @utf8_ascii.getbyte(index)
- end
+ it "agrees with #getbyte" do
+ @utf8_ascii.bytes.to_a.each_with_index do |byte,index|
+ byte.should == @utf8_ascii.getbyte(index)
end
+ end
- it "is unaffected by #force_encoding" do
- @utf8.force_encoding('ASCII').bytes.to_a.should == @utf8.bytes.to_a
- end
+ it "is unaffected by #force_encoding" do
+ @utf8.force_encoding('ASCII').bytes.to_a.should == @utf8.bytes.to_a
end
end