summaryrefslogtreecommitdiff
path: root/spec/ruby/core/unboundmethod/dup_spec.rb
blob: 5a78dd8e3694acc943a7b10f6f614c97633f8c15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require_relative '../../spec_helper'
require_relative 'shared/dup'

describe "UnboundMethod#dup" do
  ruby_version_is "3.4" do
    it_behaves_like :unboundmethod_dup, :dup

    it "resets frozen status" do
      method = Class.instance_method(:instance_method)
      method.freeze
      method.frozen?.should == true
      method.dup.frozen?.should == false
    end
  end
end