aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/core/float/fixtures/coerce.rb
blob: 2cf155be9554ae8775b393c987825dbceb9bece6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module FloatSpecs
  class CanCoerce
    def initialize(a)
      @a = a
    end

    def coerce(b)
      [self.class.new(b), @a]
    end

    def /(b)
      @a.to_i % b.to_i
    end
  end
end