summaryrefslogtreecommitdiff
path: root/spec/ruby/core/proc/shared/to_s.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/proc/shared/to_s.rb')
-rw-r--r--spec/ruby/core/proc/shared/to_s.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/ruby/core/proc/shared/to_s.rb b/spec/ruby/core/proc/shared/to_s.rb
index 46b21dd083..de021692e2 100644
--- a/spec/ruby/core/proc/shared/to_s.rb
+++ b/spec/ruby/core/proc/shared/to_s.rb
@@ -4,8 +4,8 @@ describe :proc_to_s, shared: true do
Proc.new { "hello" }.send(@method).should =~ /^#<Proc:([^ ]*?)(@([^ ]*)\/to_s\.rb:4)?>$/
end
- it "has an ASCII-8BIT encoding" do
- Proc.new { "hello" }.send(@method).encoding.should == Encoding::ASCII_8BIT
+ it "has an BINARY encoding" do
+ Proc.new { "hello" }.send(@method).encoding.should == Encoding::BINARY
end
end
@@ -14,8 +14,8 @@ describe :proc_to_s, shared: true do
lambda { "hello" }.send(@method).should =~ /^#<Proc:([^ ]*?)(@([^ ]*)\/to_s\.rb:10)? \(lambda\)>$/
end
- it "has an ASCII-8BIT encoding" do
- lambda { "hello" }.send(@method).encoding.should == Encoding::ASCII_8BIT
+ it "has an BINARY encoding" do
+ lambda { "hello" }.send(@method).encoding.should == Encoding::BINARY
end
end
@@ -24,8 +24,8 @@ describe :proc_to_s, shared: true do
proc { "hello" }.send(@method).should =~ /^#<Proc:([^ ]*?)(@([^ ]*)\/to_s\.rb:16)?>$/
end
- it "has an ASCII-8BIT encoding" do
- proc { "hello" }.send(@method).encoding.should == Encoding::ASCII_8BIT
+ it "has an BINARY encoding" do
+ proc { "hello" }.send(@method).encoding.should == Encoding::BINARY
end
end
@@ -35,9 +35,9 @@ describe :proc_to_s, shared: true do
method("hello").to_proc.send(@method).should =~ /^#<Proc:([^ ]*?)(@([^ ]*)\/to_s\.rb:22)? \(lambda\)>$/
end
- it "has an ASCII-8BIT encoding" do
+ it "has an BINARY encoding" do
def hello; end
- method("hello").to_proc.send(@method).encoding.should == Encoding::ASCII_8BIT
+ method("hello").to_proc.send(@method).encoding.should == Encoding::BINARY
end
end
@@ -47,9 +47,9 @@ describe :proc_to_s, shared: true do
proc.send(@method).should =~ /^#<Proc:0x\h+\(&:foobar\)>$/
end
- it "has an ASCII-8BIT encoding" do
+ it "has an BINARY encoding" do
proc = :foobar.to_proc
- proc.send(@method).encoding.should == Encoding::ASCII_8BIT
+ proc.send(@method).encoding.should == Encoding::BINARY
end
end
end