Commit Graph

16 Commits

Author SHA1 Message Date
knu e4ffaf6ea8 * lib/set.rb: each() should return self.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-27 18:10:54 +00:00
gsinclair d67106c081 Small changes to documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-21 16:38:42 +00:00
knu 064f07ace5 Correct descriptions of {proper_,}{superset,subset}?.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-21 15:15:26 +00:00
gsinclair 3f3ad7e4d5 Very slight improvement to documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-21 15:09:12 +00:00
knu 2b334012fc Convert RD to Rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-24 05:29:04 +00:00
knu f9e0693360 Teach eval the correct line number to report.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-07 09:11:53 +00:00
knu 2cfae9b60f * lib/set.rb: retire contain?() and add superset?(),
proper_superset?() subset?(), and proper_subset?().
  [obtained from: Jason Voegele's set.rb]

* lib/set.rb: define several aliases: union() for |(),
  difference() for -(), ande intersection() for &().
  [obtained from: Jason Voegele's set.rb]

* lib/set.rb: deal with a s/id/object_id/ leftover.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-09 18:52:04 +00:00
matz 54fdacb125 * class.c (rb_define_method): do not set NOEX_CFUNC if klass is
really a module, whose methods must be safe for reciever's type.

* eval.c (rb_eval): nosuper should not be inherited unless the
  overwritten method is an undef placeholder.

* parse.y (primary): allow 'when'-less case statement; persuaded
  by Sean Chittenden.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-07 19:18:16 +00:00
nobu 29cef5f795 use Object#class instead of deprecated Object#type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02 16:45:35 +00:00
knu f5b9282f05 * lib/set.rb: Merge rough/lib/set.rb rev.1.5-1.15.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-20 10:46:52 +00:00
akr c47f24027a * pp.rb (ARGF.pretty_print): implemented.
(PP.pp): arguments reordered.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11 12:29:17 +00:00
knu e1488bd243 Use Enumerable#all? to optimize a bit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-07 10:58:02 +00:00
knu d29143b99e * lib/set.rb: Disallow Set.new(false). Add even more tests.
[Submitted by: "Christoph" <chr_news@gmx.net>]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-07 10:48:14 +00:00
knu 6954ba398a * lib/set.rb: Fix a bug in flatten()'s recursive set detection.
[Submitted by: "Christoph" <chr_news@gmx.net>]  Some tests
  against the bug are added.

* lib/set.rb: Resurrect the test suite by putting it after
  __END__ and executing `eval DATA.read'.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-07 10:32:23 +00:00
knu ec43854aa6 - ==(o) should be aware of all the Set variant instances, not just
those of its subclasses.

- Fix eql?().

Submitted by: "Christoph" <chr_news@gmx.net>


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-04 07:15:17 +00:00
knu fb00e309f6 Add set.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-30 13:47:49 +00:00