We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53b3fac commit 8132867Copy full SHA for 8132867
test/ruby/test_proc.rb
@@ -159,6 +159,26 @@ def test_eq
159
assert_equal(*m_nest{}, "[ruby-core:84583] Feature #14627")
160
end
161
162
+ def test_hash_equal
163
+ # iseq backed proc
164
+ p1 = proc {}
165
+ p2 = p1.dup
166
+
167
+ assert_equal p1.hash, p2.hash
168
169
+ # ifunc backed proc
170
+ p1 = {}.to_proc
171
172
173
174
175
+ # symbol backed proc
176
+ p1 = :hello.to_proc
177
+ p2 = :hello.to_proc
178
179
180
+ end
181
182
def test_hash_uniqueness
183
def self.capture(&block)
184
block
0 commit comments