Sha256: 2f5c0edaaf0e11bcbf55fe8e5b1c48c12f55dac1ca7131dbf7b62097844c3ff2

Contents?: true

Size: 333 Bytes

Versions: 3

Compression:

Stored size: 333 Bytes

Contents

class Array

  # Use division as a fetch notation.
  #--
  # Or should this be like #split?
  #++

  alias_method :/, :[]

end



=begin test

  require 'test/unit'

  class TestOpDiv < Test::Unit::TestCase

    def test_op_div
      a = [:A,:B,:C]
      assert_equal( a[1], a/1 )
      assert_equal( :B, a/1 )
    end
  end

=end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
facets-1.8.49 lib/facets/core/array/op_div.rb
facets-1.8.51 lib/facets/core/array/op_div.rb
facets-1.8.54 lib/facets/core/array/op_div.rb