From 5791cfacac4d1e3cbb3043e3607ac93c89bd6745 Mon Sep 17 00:00:00 2001 From: gsinclair Date: Tue, 21 Jan 2003 16:38:42 +0000 Subject: Small changes to documentation. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/set.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/set.rb') diff --git a/lib/set.rb b/lib/set.rb index 40715edb3..37332e1fa 100644 --- a/lib/set.rb +++ b/lib/set.rb @@ -48,7 +48,7 @@ class Set # # If a block is given, the elements of enum are preprocessed by the # given block. - def initialize(enum = nil, &block) + def initialize(enum = nil, &block) # :yields: o @hash ||= Hash.new enum.nil? and return @@ -322,10 +322,10 @@ class Set # require 'set' # files = Set.new(Dir.glob("*.rb")) # hash = files.classify { |f| File.mtime(f).year } - # p hash #=> {2000=>#, - # # 2001=>#, - # # 2002=>#} - def classify + # p hash # => {2000=>#, + # # 2001=>#, + # # 2002=>#} + def classify # :yields: o h = {} each { |i| @@ -348,10 +348,10 @@ class Set # require 'set' # numbers = Set[1, 3, 4, 6, 9, 10, 11] # set = numbers.divide { |i,j| (i - j).abs == 1 } - # p set #=> #, - # # #, - # # #, - # # #}> + # p set # => #, + # # #, + # # #, + # # #}> def divide(&func) if func.arity == 2 require 'tsort' -- cgit