From 182a408c2c4113eb316c2a87e35880144afb4498 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Wed, 14 Aug 2019 16:25:15 +0900 Subject: change Proc#to_s format ('@...' -> ' ...') (#2362) Now Proc#to_s returns "#". However, it is convenient to select a file name by (double-)clicking on some terminals by separating ' ' instead of '@' like "#" [Feature #16101] --- spec/ruby/core/proc/shared/to_s.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/ruby/core/proc') diff --git a/spec/ruby/core/proc/shared/to_s.rb b/spec/ruby/core/proc/shared/to_s.rb index a4d1d5d630..050feb7b1c 100644 --- a/spec/ruby/core/proc/shared/to_s.rb +++ b/spec/ruby/core/proc/shared/to_s.rb @@ -1,7 +1,7 @@ describe :proc_to_s, shared: true do describe "for a proc created with Proc.new" do it "returns a description optionally including file and line number" do - Proc.new { "hello" }.send(@method).should =~ /^#$/ + Proc.new { "hello" }.send(@method).should =~ /^#$/ end it "has a binary encoding" do @@ -11,7 +11,7 @@ describe :proc_to_s, shared: true do describe "for a proc created with lambda" do it "returns a description including '(lambda)' and optionally including file and line number" do - -> { "hello" }.send(@method).should =~ /^#$/ + -> { "hello" }.send(@method).should =~ /^#$/ end it "has a binary encoding" do @@ -21,7 +21,7 @@ describe :proc_to_s, shared: true do describe "for a proc created with proc" do it "returns a description optionally including file and line number" do - proc { "hello" }.send(@method).should =~ /^#$/ + proc { "hello" }.send(@method).should =~ /^#$/ end it "has a binary encoding" do @@ -32,7 +32,7 @@ describe :proc_to_s, shared: true do describe "for a proc created with UnboundMethod#to_proc" do it "returns a description including '(lambda)' and optionally including file and line number" do def hello; end - method("hello").to_proc.send(@method).should =~ /^#$/ + method("hello").to_proc.send(@method).should =~ /^#$/ end it "has a binary encoding" do -- cgit v1.2.3