public
Description: Rubinius, the Ruby VM
Homepage: http://rubini.us
Clone URL: git://github.com/evanphx/rubinius.git
Search Repo:
rubinius / kernel / core / precision.rb
100644 21 lines (17 sloc) 0.269 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# depends on: module.rb
 
module Precision
  def prec(klass)
    klass.induced_from(self)
  end
 
  def prec_f
    prec(Float)
  end
 
  def prec_i
    prec(Integer)
  end
 
  def self.included(klass)
    def klass.induced_from(obj)
      raise TypeError
    end
  end
end