Project

General

Profile

This project is closed and read-only.

Actions

Bug #119

closed

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

Bug #119: Set#divide and SortedSet#divide raise NoMethodErrors when passed no block

Added by NoKarma (Arthur Schreiber) over 18 years ago. Updated over 15 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

Updated by knu (Akinori MUSHA) over 18 years ago Actions #1

  • % Done changed from 0 to 50

=begin
It returns an enumerator in trunk. Maybe ruby_1_8 will get a backport later.
=end

Updated by Anonymous over 18 years ago Actions #2

=begin
Issue #119 has been updated by Akinori MUSHA.

% Done changed from 0 to 50

It returns an enumerator in trunk. Maybe ruby_1_8 will get a backport later.

Bug #119: Set#divide and SortedSet#divide raise NoMethodErrors when passed no block
http://redmine.ruby-lang.org/issues/show/119

Author: Arthur Schreiber
Status: Open
Priority: Normal
Assigned to: Akinori MUSHA
Category:
Target version:

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.


You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://redmine.ruby-lang.org/my/account

=end

Updated by knu (Akinori MUSHA) over 17 years ago Actions #3

  • Status changed from Open to Closed

=begin
Weird. Seems backport had already been done when I updated the issue.
=end

Updated by knu (Akinori MUSHA) over 17 years ago Actions #4

  • % Done changed from 50 to 100

=begin

=end

Actions

Also available in: PDF Atom