[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/MSNexploder/jruby/test-latest_java8/spec/jruby/array_spec.rb [Back]  [Original]

# JRuby adds optimized versions of #any?, #all? and #find to Array which only delegate to Enumerable if Array#each has
# been overridden.  This spec ensures we don't regress on any of the customizations.

class ArrayExtender < Array
  def each
    yield "eachElem"
  end
end

array_extender = ArrayExtender.new
array_extender 

Web Proxy Viewer  |  New URL  |  Original Page