summaryrefslogtreecommitdiff
path: root/spec/ruby/core/array/fixtures/encoded_strings.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/array/fixtures/encoded_strings.rb')
-rw-r--r--spec/ruby/core/array/fixtures/encoded_strings.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/spec/ruby/core/array/fixtures/encoded_strings.rb b/spec/ruby/core/array/fixtures/encoded_strings.rb
index e31e247afe..b5888d86ae 100644
--- a/spec/ruby/core/array/fixtures/encoded_strings.rb
+++ b/spec/ruby/core/array/fixtures/encoded_strings.rb
@@ -2,14 +2,14 @@
module ArraySpecs
def self.array_with_usascii_and_7bit_utf8_strings
[
- 'foo'.force_encoding('US-ASCII'),
+ 'foo'.dup.force_encoding('US-ASCII'),
'bar'
]
end
def self.array_with_usascii_and_utf8_strings
[
- 'foo'.force_encoding('US-ASCII'),
+ 'foo'.dup.force_encoding('US-ASCII'),
'báz'
]
end
@@ -17,7 +17,7 @@ module ArraySpecs
def self.array_with_7bit_utf8_and_usascii_strings
[
'bar',
- 'foo'.force_encoding('US-ASCII')
+ 'foo'.dup.force_encoding('US-ASCII')
]
end
@@ -25,45 +25,45 @@ module ArraySpecs
[
'báz',
'bar',
- 'foo'.force_encoding('US-ASCII')
+ 'foo'.dup.force_encoding('US-ASCII')
]
end
def self.array_with_usascii_and_utf8_strings
[
- 'foo'.force_encoding('US-ASCII'),
+ 'foo'.dup.force_encoding('US-ASCII'),
'bar',
'báz'
]
end
- def self.array_with_utf8_and_7bit_ascii8bit_strings
+ def self.array_with_utf8_and_7bit_binary_strings
[
'bar',
'báz',
- 'foo'.force_encoding('ASCII-8BIT')
+ 'foo'.dup.force_encoding('BINARY')
]
end
- def self.array_with_utf8_and_ascii8bit_strings
+ def self.array_with_utf8_and_binary_strings
[
'bar',
'báz',
- [255].pack('C').force_encoding('ASCII-8BIT')
+ [255].pack('C').force_encoding('BINARY')
]
end
- def self.array_with_usascii_and_7bit_ascii8bit_strings
+ def self.array_with_usascii_and_7bit_binary_strings
[
- 'bar'.force_encoding('US-ASCII'),
- 'foo'.force_encoding('ASCII-8BIT')
+ 'bar'.dup.force_encoding('US-ASCII'),
+ 'foo'.dup.force_encoding('BINARY')
]
end
- def self.array_with_usascii_and_ascii8bit_strings
+ def self.array_with_usascii_and_binary_strings
[
- 'bar'.force_encoding('US-ASCII'),
- [255].pack('C').force_encoding('ASCII-8BIT')
+ 'bar'.dup.force_encoding('US-ASCII'),
+ [255].pack('C').force_encoding('BINARY')
]
end
end