summaryrefslogtreecommitdiff
path: root/spec/ruby/core/refinement/refined_class_spec.rb
blob: 00b65d08955ab3b382866468c766c451b5a99601 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require_relative '../../spec_helper'

describe "Refinement#refined_class" do
  ruby_version_is "3.2"..."3.3" do
    it "returns the class refined by the receiver" do
      refinement_int = nil

      Module.new do
        refine Integer do
          refinement_int = self
        end
      end

      refinement_int.refined_class.should == Integer
    end
  end
end