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

describe "Method#clone" do
  it_behaves_like :method_dup, :clone

  it "preserves frozen status" do
    method = Object.new.method(:method)
    method.freeze
    method.frozen?.should == true
    method.clone.frozen?.should == true
  end
end