aboutsummaryrefslogtreecommitdiffstats
path: root/lib/set.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* * lib/set.rb (Set#collect, Set#select): Back out. I thought itknu2008-06-031-20/+1
| | | | | | | was consistent but turned out to be wrong. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb (Set#collect, Set#select): Override Enumerableknu2008-06-031-3/+29
| | | | | | | | | | | | methods and make them return a set. [ruby-core:17055] (Set#delete_if, Set#collect!, Set#reject!, Set#classify) (Set#divide, Set#delete_if): Return an enumerator if no block is given. (Set#classify): Define an alias `group_by' to override that of Enumerable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb (Set#each, SortedSet#each, TC_Set#test_each): Returnknu2008-04-231-5/+7
| | | | | | | an enumerator if no block is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ipaddr.rb: Say that I am the current maintainer.knu2008-03-211-0/+4
| | | | | | | | | | | * lib/set.rb: Ditto. * lib/shellwords.rb: Ditto. * ext/syslog/syslog.txt: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb: Revise rdoc.knu2007-03-201-7/+24
| | | | | | | | | * lib/set.rb (Set#freeze, Set#taint, Set#untaint): Implement Set#freeze, Set#taint, and Set#untaint; requested by: Dan Hutchings <dan AT moltoagitato.com> in [ruby-bugs:PR#9359]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb (Set#^, Set#&): Correct documentation. Those methodsknu2007-03-031-2/+2
| | | | | | | | return sets, not arrays; noted by Oliver Frank Wittich <nietz AT mangabrain.de>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb (Set#^): Fix XOR operation against a container thatknu2006-11-021-2/+9
| | | | | | | holds duplicate values. [issue: #6444] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/xmlrpc/create.rb (XMLRPC::Create::conv2value): Symbol shouldmatz2006-11-021-1/+0
| | | | | | | | | | | | | | | | | | | come earlier than String. * lib/soap/mapping/rubytypeFactory.rb (RubytypeFactory::obj2soap): ditto. * lib/set.rb (TC_Set::test_s_new): strings are no longer Enumerable * lib/soap/property.rb (Property::load): ditto. * lib/webrick/httputils.rb (WEBrick::HTTPUtils::parse_header): ditto. * lib/soap/mimemessage.rb (MIMEMessage::Headers::parse): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb: test change to follow revision 1.28. (duck typing?)ocean2005-07-041-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): pre-evaluate argument for unambiguousmatz2005-06-301-9/+1
| | | | | | | | | | | | | | evaluation order. [ruby-dev:26383] * lib/delegate.rb (Delegator::method_missing): forward unknown method to the destination. suggested by <christophe.poucet@gmail.com>. [ruby-talk:146776] * process.c (detach_process_watcher): terminate process watcher thread right after rb_waitpid() succeed. [ruby-talk:146430] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb (Set#==): [ruby-dev:25206] (ported from ruby_1_8 branch)ocean2005-06-251-10/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test for [ruby-dev:26127].akr2005-05-291-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: replace rb_protect_inspect() and rb_inspecting_p() bymatz2005-03-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rb_exec_recursive() in eval.c. * eval.c (rb_exec_recursive): new function. * array.c (rb_ary_join): use rb_exec_recursive(). * array.c (rb_ary_inspect, rb_ary_hash): ditto. * file.c (rb_file_join): ditto. * hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto. * io.c (rb_io_puts): ditto. * object.c (rb_obj_inspect): ditto * struct.c (rb_struct_inspect): ditto. * lib/set.rb (SortedSet::setup): a hack to shut up warning. [ruby-talk:132866] * lib/time.rb (Time::strptime): add new function. inspired by [ruby-talk:132815]. * lib/parsedate.rb (ParseDate::strptime): ditto. * regparse.c: move st_*_strend() functions from st.c. fixed some potential memory leaks. * exception error messages updated. [ruby-core:04497] * ext/socket/socket.c (Init_socket): add bunch of Socket constants. Patch from Sam Roberts <sroberts@uniserve.com>. [ruby-core:04409] * array.c (rb_ary_s_create): no need for negative argc check. [ruby-core:04463] * array.c (rb_ary_unshift_m): ditto. * lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass of StandardError class, not Exception class. [ruby-core:04429] * parse.y (fcall_gen): lvar(arg) will be evaluated as lvar.call(arg) when lvar is a defined local variable. [new] * object.c (rb_class_initialize): call inherited method before calling initializing block. * eval.c (rb_thread_start_1): initialize newly pushed frame. * lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE. fixed: [ruby-core:04444] * eval.c (is_defined): NODE_IASGN is an assignment. * ext/readline/readline.c (Readline.readline): use rl_outstream and rl_instream. [ruby-dev:25699] * ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check [ruby-dev:25675] * misc/ruby-mode.el: [ruby-core:04415] * lib/rdoc/generators/html_generator.rb: [ruby-core:04412] * lib/rdoc/generators/ri_generator.rb: ditto. * struct.c (make_struct): fixed: [ruby-core:04402] * ext/curses/curses.c (window_color_set): [ruby-core:04393] * ext/socket/socket.c (Init_socket): SO_REUSEPORT added. [ruby-talk:130092] * object.c: [ruby-doc:818] * parse.y (open_args): fix too verbose warnings for the space before argument parentheses. [ruby-dev:25492] * parse.y (parser_yylex): ditto. * parse.y (parser_yylex): the first expression in the parentheses should not be a command. [ruby-dev:25492] * lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330] * object.c (Init_Object): remove Object#type. [ruby-core:04335] * st.c (st_foreach): report success/failure by return value. [ruby-Bugs-1396] * parse.y: forgot to initialize parser struct. [ruby-dev:25492] * parse.y (parser_yylex): no tLABEL on EXPR_BEG. [ruby-talk:127711] * document updates - [ruby-core:04296], [ruby-core:04301], [ruby-core:04302], [ruby-core:04307] * dir.c (rb_push_glob): should work for NUL delimited patterns. * dir.c (rb_glob2): should aware of offset in the pattern. * string.c (rb_str_new4): should propagate taintedness. * env.h: rename member names in struct FRAME; last_func -> callee, orig_func -> this_func, last_class -> this_class. * struct.c (rb_struct_set): use original method name, not callee name, to retrieve member slot. [ruby-core:04268] * time.c (time_strftime): protect from format modification from GC finalizers. * object.c (Init_Object): remove rb_obj_id_obsolete() * eval.c (rb_mod_define_method): incomplete subclass check. [ruby-dev:25464] * gc.c (rb_data_object_alloc): klass may be NULL. [ruby-list:40498] * bignum.c (rb_big_rand): should return positive random number. [ruby-dev:25401] * bignum.c (rb_big_rand): do not use rb_big_modulo to generate random bignums. [ruby-dev:25396] * variable.c (rb_autoload): [ruby-dev:25373] * eval.c (svalue_to_avalue): [ruby-dev:25366] * string.c (rb_str_justify): [ruby-dev:25367] * io.c (rb_f_select): [ruby-dev:25312] * ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072] * struct.c (make_struct): [ruby-dev:25249] * dir.c (dir_open_dir): new function. [ruby-dev:25242] * io.c (rb_f_open): add type check for return value from to_open. * lib/pstore.rb (PStore#transaction): Use the empty content when a file is not found. [ruby-dev:24561] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb (Set#==): [ruby-dev:25206]matz2004-12-151-7/+7
| | | | | | | | | | | * ext/openssl/ossl_digest.c (ossl_digest_initialize): [ruby-dev:25198] * utf8.c (utf8_is_mbc_ambiguous): [ruby-talk:123561] * utf8.c (utf8_mbc_to_normalize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (zstream_append_input): clear klass for z->inputmatz2004-10-231-9/+12
| | | | | | | to avoid potential vulnerability. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dln.c, io.c, pack.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb,nobu2004-04-181-2/+2
| | | | | | | | | | | | | | lib/date.rb, lib/ftools.rb, lib/getoptlong.rb, lib/logger.rb, lib/matrix.rb, lib/monitor.rb, lib/set.rb, lib/thwait.rb, lib/timeout.rb, lib/yaml.rb, lib/drb/drb.rb, lib/irb/workspace.rb, lib/net/ftp.rb, lib/net/http.rb, lib/net/imap.rb, lib/net/pop.rb, lib/net/telnet.rb, lib/racc/parser.rb, lib/rinda/rinda.rb, lib/rinda/tuplespace.rb, lib/shell/command-processor.rb, lib/soap/rpc/soaplet.rb, lib/test/unit/testcase.rb, lib/test/unit/testsuite.rb: typo fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/prettyprint.rb (PrettyPrint#seplist): added.akr2004-02-051-8/+1
| | | | | | | | | | | | | * lib/pp.rb (PPMethods#pp_object): use seplist. (PPMethods#pp_hash): ditto. (Array#pretty_print): ditto. (Struct#pretty_print): ditto. (MatchData#pretty_print): ditto. * lib/set.rb (Set#pretty_print): use seplist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Reword and fix Overview.knu2003-10-171-6/+5
| | | | | | | It is not necessary to require 'test/unit/ui/console/testrunner'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Minor documentation improvementsgsinclair2003-09-191-2/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Improved documentationgsinclair2003-09-191-22/+36
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Small documentation correctiongsinclair2003-09-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb: each() should return self.knu2003-07-271-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Small changes to documentation.gsinclair2003-01-211-9/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Correct descriptions of {proper_,}{superset,subset}?.knu2003-01-211-5/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Very slight improvement to documentation.gsinclair2003-01-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Convert RD to Rdoc.knu2002-12-241-216/+119
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Teach eval the correct line number to report.knu2002-12-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb: retire contain?() and add superset?(),knu2002-11-091-17/+128
| | | | | | | | | | | | | | 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
* * class.c (rb_define_method): do not set NOEX_CFUNC if klass ismatz2002-11-071-1/+1
| | | | | | | | | | | | | 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
* use Object#class instead of deprecated Object#type.nobu2002-10-021-12/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb: Merge rough/lib/set.rb rev.1.5-1.15.knu2002-09-201-36/+394
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pp.rb (ARGF.pretty_print): implemented.akr2002-09-111-2/+2
| | | | | | | (PP.pp): arguments reordered. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use Enumerable#all? to optimize a bit.knu2002-09-071-5/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb: Disallow Set.new(false). Add even more tests.knu2002-09-071-4/+33
| | | | | | | [Submitted by: "Christoph" <chr_news@gmx.net>] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/set.rb: Fix a bug in flatten()'s recursive set detection.knu2002-09-071-292/+315
| | | | | | | | | | | [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
* - ==(o) should be aware of all the Set variant instances, not justknu2002-09-041-2/+2
| | | | | | | | | | | 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
* Add set.rb.knu2002-08-301-0/+778
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e