Project

General

Profile

Actions

Bug #119

closed

Set#divide and SortedSet#divide raise NoMethodErrors when passed no block

Added by NoKarma (Arthur Schreiber) over 16 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
[ruby-core:17147]

Description

=begin
Set[1].divide # => raises a NoMethodError: undefined method arity' for nil:NilClass SortedSet[1].divide # => raises a NoMethodError: undefined method arity' for nil:NilClass

Raising a LocalJumpError or returning an enumerator would be much more consistent with general behaviour in Ruby.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0