Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit c934c3e

Browse files
committed
unified solution for all ruby versions
1 parent 00de957 commit c934c3e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/rspec/mocks/proxy.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,7 @@ def initialize(object, order_group, options={})
3535

3636
# @private
3737
def ensure_can_be_proxied!(object)
38-
if RUBY_VERSION.to_f < 2.0
39-
return if !object.is_a?(Symbol) && !object.frozen?
40-
else
41-
return unless object.frozen?
42-
end
43-
38+
return unless object.is_a?(Symbol) || object.frozen?
4439
return if object.nil?
4540

4641
msg = "Cannot proxy frozen objects"

0 commit comments

Comments
 (0)