Sha256: 2e7221a246f7150bb23e1b73a32ba10408403b0296150be9b3835c233c121bb2
Contents?: true
Size: 464 Bytes
Versions: 10
Compression:
Stored size: 464 Bytes
Contents
class Object # Is self included in other? # # 5.in?(0..10) #=> true # 5.in?([0,1,2,3]) #=> false # def in?(other) other.include?(self) end end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TCKernel < Test::Unit::TestCase def test_in? assert( 5.in?(0..10) ) assert( 5.in?([1,2,3,4,5]) ) end end =end
Version data entries
10 entries across 10 versions & 1 rubygems