Project

General

Profile

Bug #119

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

Added by NoKarma (Arthur Schreiber) over 12 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
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

Also available in: Atom PDF