Sha256: 2489e33fccb543d1abdc410ad9c8c9f81454e05f09ec33c85466e47c7b9cf391
Contents?: true
Size: 465 Bytes
Versions: 16
Compression:
Stored size: 465 Bytes
Contents
module Kernel # 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
16 entries across 16 versions & 1 rubygems