aboutsummaryrefslogtreecommitdiffstats
path: root/lib/find.rb
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate taint/trust and related methods, and make the methods no-opsJeremy Evans2019-11-181-2/+2
| | | | | | This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby.
* Use `start_with?(quoted)` instead of `[0] == char literal`Kazuhiro NISHIYAMA2019-05-081-1/+1
|
* Find.find -> Use Dir.children instead of Dir.entriesnaruse2017-09-151-2/+1
| | | | | | | | | | | | | | | | Dir.children is available since Feature #11302. Find.find can use of the new list (having no '.' neither '..' entries), making now superflous an if statement. This change can improve the performance of Find.find when the path has lots of entries (thousands?). https://bugs.ruby-lang.org/issues/11302 patched by Espartaco Palma <esparta@gmail.com> https://github.com/ruby/ruby/pull/1697 fix GH-1697 [Feature #13896] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/find.rb: Specify frozen_string_literal: true.kazu2017-02-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* find.rb: raise with the namenobu2016-02-191-1/+1
| | | | | | | * lib/find.rb (Find#find): raise with the given path name if it does not exist. [ruby-dev:49497] [Bug #12087] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb (Find.find): Call to_path for arguments to obtainakr2014-10-131-0/+1
| | | | | | | | | strings. [ruby-core:63713] [Bug #10035] Reported by Herwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb (Find#find): should pass ignore_error option to enumerators.ktsj2014-03-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* find.rb: add ignore_errornobu2014-03-021-1/+3
| | | | | | | * lib/find.rb (Find#find): add "ignore_error" keyword argument defaulted to true. [ruby-core:51025] [Feature #7596] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb (Find.find): respect the encodings of arguments.ktsj2013-09-071-17/+23
| | | | | | | | [ruby-dev:47530] [Feature #8657] * test/test_find.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r36994 "* lib/find.rb: Error in documentation example"nobu2012-09-201-1/+1
| | | | | | * lib/find.rb: revert wrong example. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb: Error in documentation examplezzak2012-09-201-1/+1
| | | | | | | Found by Herwin Weststrate, thank you! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb (Find.find): add documentation that Find.findktsj2011-09-171-0/+2
| | | | | | without block returns an enumerator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib: Convert tabs to spaces for ruby files perdrbrain2011-05-181-1/+1
| | | | | | | | | http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style Patch by Steve Klabnik [Ruby 1.9 - Bug #4730] Patch by Jason Dew [Ruby 1.9 - Feature #4718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb (Find.find): rescue more exceptions which is possible toakr2009-12-151-2/+2
| | | | | | | occur by other process change the directory tree. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb (Find.find): get rid of race condition.nobu2009-12-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb (Find.find): rescue only ENOENT and EACCES for lstat.akr2009-12-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb (Find.find): narrow rescue region.akr2009-12-141-11/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb (Find.find): removed already unnecessary code.nobu2009-12-141-7/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb (Find.find): sort directory entries. [ruby-dev:39847]akr2009-12-131-16/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb (Find.find): reduce stat system call.akr2009-12-061-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix indent.akr2009-12-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb (Find#find): Return an enumerator if no block isknu2008-06-101-0/+2
| | | | | | | given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/find.rb: should raise ENOENT if root entry does not exist,usa2006-02-201-1/+1
| | | | | | | without opening it. [ruby-dev:28345] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/fileutils.rb (FileUtils::ln): ln documentation fix.matz2005-11-191-0/+1
| | | | | | | [ruby-core:06661] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb: a patch from Florian Gross <florgro@gmail.com>matz2005-09-051-2/+1
| | | | | | | | | | | | | | | merged to allow recursive inspect (and to_s) for OpenStruct. [ruby-core:05532] * lib/observer.rb: a patch from nornagon <nornagon@gmail.com> merged to allow arbitrary names for update methods. [ruby-core:05416] * eval.c (rb_f_fcall): new method to avoid inefficiency of obj.instance_eval{send(...)} tricks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (KR_REHASH): wrong hash value on sizeof(long) > sizeof(int).matz2004-02-131-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (newline_node): do not use NODE_NEWLINE node anymore,matz2004-01-211-1/+2
| | | | | | | | | | | | | | | | use NEWLINE flag instead. * ext/socket/socket.c (sock_gethostbyname): returns host if ai_canonname is NULL. (ruby-bugs PR#1243) * parse.y (block_append): update nd_end for "real" head node. [ruby-list:39058] * marshal.c (w_class): should not dump singleton class. [ruby-dev:22631] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added RDoc comments.gsinclair2003-01-201-10/+43
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (id2ref): sometimes confused symbol and reference.matz2001-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * dir.c (glob_helper): breaks loop after calling recusive glob_helper; all wild cards should be consumed; no need for further match. * dir.c (dir_s_glob): gives warning if no match found. * object.c (sym_inspect): did allocate extra byte space. * marshal.c (shortlen): shortlen should return number of bytes written. * eval.c (ev_const_defined): need not to check if cbase->nd_class is rb_cObject. * eval.c (ev_const_get): ditto. * time.c (time_zone): return "UTC" for UTC time objects. * eval.c (THREAD_ALLOC): flags should be initialized. * signal.c (rb_f_kill): should use FIX2INT, not FIX2UINT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-12-051-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-10-021-16/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-09-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ebaneban2000-09-211-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ebaneban2000-09-211-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-09-211-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-02-17matz2000-02-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 20000105matz2000-01-051-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* This commit was generated by cvs2svn to compensate for changes in r372,matz1999-01-201-2/+2
| | | | | | | which included commits to RCS files with non-trunk default branches. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Initial revisionv1_0_r2matz1998-01-161-0/+39
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2 b2dd03c8-39d4-4d8f-98ff-823fe69b080e