File: array.rb

package info (click to toggle)
ruby-rspec-expectations 2.14.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 916 kB
  • ctags: 724
  • sloc: ruby: 8,202; makefile: 4
file content (9 lines) | stat: -rw-r--r-- 210 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
# @private
class Array
  unless public_instance_methods.map {|m| m.to_s}.include?('none?')
    # Supports +none?+ on early patch levels of Ruby 1.8.6
    def none?(&block)
      !any?(&block)
    end
  end
end