summaryrefslogtreecommitdiff
path: root/spec/ruby/core/proc/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/proc/fixtures')
-rw-r--r--spec/ruby/core/proc/fixtures/common.rb7
-rw-r--r--spec/ruby/core/proc/fixtures/proc_aref.rb10
-rw-r--r--spec/ruby/core/proc/fixtures/proc_aref_frozen.rb10
-rw-r--r--spec/ruby/core/proc/fixtures/proc_call.rb10
-rw-r--r--spec/ruby/core/proc/fixtures/proc_call_frozen.rb10
5 files changed, 27 insertions, 20 deletions
diff --git a/spec/ruby/core/proc/fixtures/common.rb b/spec/ruby/core/proc/fixtures/common.rb
index 204acde597..dfe67d7ba8 100644
--- a/spec/ruby/core/proc/fixtures/common.rb
+++ b/spec/ruby/core/proc/fixtures/common.rb
@@ -47,6 +47,13 @@ module ProcSpecs
@first = other.first
@second = other.second
end
+
+ def initialize_clone(other, **options)
+ super
+ @initializer = :clone
+ @first = other.first
+ @second = other.second
+ end
end
class Arity
diff --git a/spec/ruby/core/proc/fixtures/proc_aref.rb b/spec/ruby/core/proc/fixtures/proc_aref.rb
deleted file mode 100644
index 8ee355b14c..0000000000
--- a/spec/ruby/core/proc/fixtures/proc_aref.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: false
-module ProcArefSpecs
- def self.aref
- proc {|a| a }["sometext"]
- end
-
- def self.aref_freeze
- proc {|a| a }["sometext".freeze]
- end
-end
diff --git a/spec/ruby/core/proc/fixtures/proc_aref_frozen.rb b/spec/ruby/core/proc/fixtures/proc_aref_frozen.rb
deleted file mode 100644
index 50a330ba4f..0000000000
--- a/spec/ruby/core/proc/fixtures/proc_aref_frozen.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-# frozen_string_literal: true
-module ProcArefFrozenSpecs
- def self.aref
- proc {|a| a }["sometext"]
- end
-
- def self.aref_freeze
- proc {|a| a }["sometext".freeze]
- end
-end
diff --git a/spec/ruby/core/proc/fixtures/proc_call.rb b/spec/ruby/core/proc/fixtures/proc_call.rb
new file mode 100644
index 0000000000..32048f5319
--- /dev/null
+++ b/spec/ruby/core/proc/fixtures/proc_call.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: false
+module ProcCallSpecs
+ def self.call
+ proc {|a| a }.call("sometext")
+ end
+
+ def self.call_freeze
+ proc {|a| a }.call("sometext".freeze)
+ end
+end
diff --git a/spec/ruby/core/proc/fixtures/proc_call_frozen.rb b/spec/ruby/core/proc/fixtures/proc_call_frozen.rb
new file mode 100644
index 0000000000..29ffc3c4c9
--- /dev/null
+++ b/spec/ruby/core/proc/fixtures/proc_call_frozen.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+module ProcCallFrozenSpecs
+ def self.call
+ proc {|a| a }.call("sometext")
+ end
+
+ def self.call_freeze
+ proc {|a| a }.call("sometext".freeze)
+ end
+end