akr
9373c5efb9
Pathname#empty? implemented.
...
* ext/pathname/pathname.c (Pathname#empty?): New method.
[ruby-core:76404] [Feature#12596] Proposed by John Backus.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05 03:29:08 +00:00
nobu
e4257036ec
pathname.c: unnormalized Fixnum value
...
* ext/pathname/pathname.c (path_hash): fix unnormalized Fixnum
value bug on mingw/mswin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-04 01:51:18 +00:00
nobu
c463366dfd
rb_funcallv
...
* *.c: rename rb_funcall2 to rb_funcallv, except for extensions
which are/will be/may be gems. [Fix GH-1406]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-29 11:57:14 +00:00
nobu
64fea27496
Update dependencies
...
* common.mk (compile.o, loadpath.o): update dependencies.
* common.mk (vm_call.o): remove stale object dependencies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-06 05:48:13 +00:00
naruse
c4fdfabcc8
handle ext/ as r53141
...
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts
fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&#
frozen_string_literal: false\n");f.rewind;f.write s}}'
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:31:54 +00:00
akr
68ebbbfebe
* lib/open-uri.rb: Remove indicator for "frozen_string_literal: true".
...
* lib/pp.rb: Ditto.
* lib/prettyprint.rb: Ditto.
* lib/resolv.rb: Ditto.
* lib/securerandom.rb: Ditto.
* lib/tmpdir.rb: Ditto.
* lib/unicode_normalize/tables.rb: Ditto.
* test/net/ftp/test_buffered_socket.rb: Ditto.
* test/net/ftp/test_mlsx_entry.rb: Ditto.
* test/open-uri/test_open-uri.rb: Ditto.
* test/open-uri/test_ssl.rb: Ditto.
* test/pathname/test_pathname.rb: Ditto.
* test/test_pp.rb: Ditto.
* test/test_prettyprint.rb: Ditto.
* tool/transcode-tblgen.rb: Ditto.
* ext/pathname/lib/pathname.rb: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 11:48:14 +00:00
akr
36ca18b847
Put an line before "frozen_string_literal: true" for emacs.
...
https://bugs.ruby-lang.org/issues/8976#note-49
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-05 22:22:56 +00:00
akr
7ab70c3548
* ext/pathname/lib/pathname.rb: freeze string literals for
...
reduced object allocation.
patch by schneems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-04 13:05:32 +00:00
akr
8bb581f8dd
* ext/pathname/lib/pathname.rb (descend): Blockless form supported.
...
(ascend): Ditto.
[ruby-core:68820] [Feature #11052 ] Patch by Piotr Szotkowski.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-14 15:14:46 +00:00
hsbt
180293ac89
* ext/pathname/lib/pathname.rb: Remove condition of RUBY_VERSION <= 1.9.
...
[Feature #11082 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-14 06:54:22 +00:00
zzak
857756ac6e
* file.c: NotImplementedError is raised if birthtime is unavailable.
...
Patch by @y-yagi san and [Fixes GH-817] [ci skip] [DOC]
* ext/pathname/pathname.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-19 17:57:03 +00:00
nobu
28b9f11d5a
protoize no-arguments functions
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-30 05:25:32 +00:00
nobu
8ae989f6b6
pathname.rb: fix a Pathname#relative_path_from crash on
...
* ext/pathname/lib/pathname.rb (SAME_PATHS):
Pathname#relative_path_from uses String#casecmp to compare strings
on case-insensitive filesystem platforms (e.g., Windows). This can
return nil for strings with different encodings, and the code
previously assumed that it always returned a Fixnum. [Fix GH-713]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-15 01:29:21 +00:00
ktsj
9f051c80dc
* file.c, ext/pathname/pathname.c: [DOC] correct position of method rdoc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-06 12:45:27 +00:00
usa
d0465cc9e0
* ext/pathname/pathname.c (path_birthtime): Windows support.
...
see [Feature #9857 ] [ruby-dev:48339]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28 13:58:01 +00:00
akr
b9faaf6a55
* ext/pathname/pathname.c (path_birthtime): New method,
...
Pathname#birthtime.
Proposed by Kazuhiro NISHIYAMA. [ruby-dev:48232] [Feature #9857 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28 13:46:02 +00:00
akr
edacb3a94a
* ext/pathname/lib/pathname.rb (cleanpath_aggressive): make all
...
separators File::SEPARATOR from File::ALT_SEPARATOR.
Reported by Daniel Rikowski.
Fixed by Nobuyoshi Nakada. [Bug #9618 ]
* ext/pathname/lib/pathname.rb (cleanpath_conservative): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-05 13:09:58 +00:00
akr
391fc2eeec
* ext/pathname/lib/pathname.rb (Pathname#/): Aliased to Pathname#+.
...
Suggested by Alexey Muranov. [ruby-core:61432] [Feature #9625 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-05 12:49:27 +00:00
kazu
60d4fc9f68
Fix error with empty args.
...
* ext/pathname/lib/pathname.rb (Pathname#join): Fix error with
empty args. Reported by ko1 via IRC.
* test/pathname/test_pathname.rb (TestPathname#test_join): Add the
test for above case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-02 02:51:20 +00:00
kazu
6df5f314ac
remove unnecessary unshift
...
* ext/pathname/lib/pathname.rb (Pathname#join): remove unnecessary unshift.
* test/pathname/test_pathname.rb (TestPathname#test_join): add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-25 14:42:36 +00:00
ktsj
df0991f34b
* ext/pathname/lib/pathname.rb (Pathname#find): add "ignore_error"
...
keyword argument defaulted to true as well as Find#find.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-04 15:44:53 +00:00
nobu
7566c49068
ruby/ruby.h: RB_BLOCK_CALL_FUNC_ARGLIST
...
* include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration
argument list of rb_block_call_func.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29 07:59:14 +00:00
ko1
ad0ef29da7
* array.c (rb_ary_splice): use RARRAY_PTR_USE() without WB because
...
there are not new relations.
* enum.c (enum_sort_by): ditto.
* struct.c (setup_struct): use RARRAY_RAWPTR().
* vm_eval.c (yield_under): ditto.
* ext/pathname/pathname.c (path_entries): use RARRAY_AREF().
* ext/pathname/pathname.c (path_s_glob): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26 05:47:27 +00:00
ktsj
854520fc1e
* ext/pathname/pathname.c (path_inspect): use PRIsVALUE to preserve
...
the result encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-19 05:21:38 +00:00
ktsj
edb98f8b91
fix typos. Patch by k_takata.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 03:10:21 +00:00
akr
788b45da3e
* ext/-test-/debug/depend: New file.
...
* ext/-test-/exception/depend: Ditto.
* ext/-test-/printf/depend: Ditto.
* ext/-test-/string/depend: Ditto.
* ext/coverage/depend: Ditto.
* ext/io/console/depend: Ditto.
* ext/io/nonblock/depend: Ditto.
* ext/io/wait/depend: Ditto.
* ext/openssl/depend: Ditto.
* ext/pathname/depend: Ditto.
* ext/psych/depend: Ditto.
* ext/zlib/depend: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-14 10:48:08 +00:00
akr
c3d1fde2b5
* ext/pathname/pathname.c (path_write): New method.
...
(path_binwrite): Ditto.
[ruby-core:49468] [Feature #7378 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-04 11:12:12 +00:00
zzak
7d183dab15
* ext/pathname/pathname.c (path_f_pathname): rdoc for Pathname()
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-08 04:21:43 +00:00
drbrain
d5ba73e0d9
* ext/pathname/lib/pathname.rb: Hide private methods from RDoc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-11 06:25:56 +00:00
nobu
857ec7118f
pathname.c: suppress -Wcomment warning
...
* ext/pathname/pathname.c (path_s_glob): get rid of "/*" within block
comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-12 14:16:16 +00:00
zzak
b5c38622b1
* ext/pathname/lib/pathname.rb: Documentation for Pathname.
...
* ext/pathname/pathname.c: ditto.
[Bug #6947 ] [ruby-core:47354]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-12 13:54:08 +00:00
nobu
b0dd250dc9
use RB_TYPE_P() instead of comparison of TYPE()
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23 07:13:21 +00:00
nobu
ed469831e4
* file.c (rb_enc_path_next, rb_enc_path_skip_prefix)
...
(rb_enc_path_last_separator, rb_enc_path_end)
(ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware
path handling functions.
* file.c (rb_home_dir, file_expand_path, rb_realpath_internal)
(rb_file_s_basename, rb_file_dirname, rb_file_s_extname)
(rb_file_join): should respect the encodings of arguments than
file system encoding. [ruby-dev:45145] [Bug #5919 ]
* dir.c (check_dirname, ruby_glob0): ditto.
* ext/pathname/pathname.c (path_sub_ext): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-25 02:32:06 +00:00
akr
afb5eef4e2
* ext/pathname/pathname.c (path_entries): add document suggested by
...
the thread [ruby-core:41959] [Bug #5859 ].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-09 11:28:00 +00:00
akr
54f282c2c4
* lib/pathname.rb (Pathname#find): return an enumerator if
...
no block is given.
* test/pathname/test_pathname.rb: add tests for above.
[ruby-dev:44797] [Feature #5572 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-19 12:52:37 +00:00
ktsj
c3749b6a6d
* ext/pathname/lib/pathname.rb, ext/tk/lib/multi-tk.rb,
...
ext/tk/sample/demos-en/widget, lib/benchmark.rb, lib/irb/cmd/fork.rb,
lib/mkmf.rb, lib/net/ftp.rb, lib/net/smtp.rb, lib/open3.rb,
lib/pstore.rb, lib/rexml/element.rb, lib/rexml/light/node.rb,
lib/rinda/tuplespace.rb, lib/rss/maker/base.rb,
lib/rss/maker/entry.rb, lib/scanf.rb, lib/set.rb, lib/shell.rb,
lib/shell/command-processor.rb, lib/shell/process-controller.rb,
lib/shell/system-command.rb, lib/uri/common.rb: remove unused block
arguments to avoid creating Proc objects.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-05 07:37:47 +00:00
drbrain
ca96541149
* ext/pathname/lib/pathname.rb: Fix typos and grammar mistakes. Patch
...
by Luke Gruber. [#5203 ]
* ext/pty/lib/expect.rb: ditto
* lib/mathn.rb: ditto
* lib/net/http.rb: ditto
* lib/open-uri.rb: ditto
* lib/ostruct.rb: ditto
* lib/tempfile.rb: ditto
* lib/thread.rb: ditto
* lib/weakref.rb: ditto
* sample/webrick/httpproxy.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26 22:22:37 +00:00
nobu
3a47cf3395
* remove trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 11:55:52 +00:00
akr
a5a51abfc5
* ext/pathname/pathname.c (path_f_pathname): Pathname() translated
...
from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-21 15:01:11 +00:00
akr
c7caeda5ed
* ext/pathname/pathname.c (Init_pathname): Pathname#=~ undefinition
...
translated from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-20 02:26:30 +00:00
akr
f9f7376848
* ext/pathname/pathname.c (path_unlink): Pathname#unlink and
...
Pathname#delete translated from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-18 22:49:34 +00:00
akr
9dffbcfc09
* ext/pathname/pathname.c (path_each_entry): Pathname#each_entry
...
translated from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-18 11:10:36 +00:00
akr
08c467330b
* ext/pathname/pathname.c (path_opendir): Pathname#opendir translated
...
from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-16 14:48:20 +00:00
akr
d0e9ac151e
* ext/pathname/pathname.c (path_rmdir): Pathname#rmdir translated
...
from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-15 21:08:19 +00:00
akr
363ed27fa7
* ext/pathname/pathname.c (path_mkdir): Pathname#mkdir translated
...
from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-15 12:07:43 +00:00
akr
f84f164413
* ext/pathname/pathname.c (path_entries): Pathname#entries translated
...
from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-14 22:23:09 +00:00
akr
bf77099923
* ext/pathname/pathname.c (path_s_getwd): Pathname.getwd and
...
Pathname.pwd translated from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-14 11:18:37 +00:00
akr
6d9b5fdffc
* ext/pathname/pathname.c (path_s_glob): Pathname.glob translated
...
from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-13 20:14:04 +00:00
akr
878747437c
* ext/pathname/pathname.c (path_zero_p): Pathname#zero? translated
...
from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-13 11:48:58 +00:00
akr
a335ded4c9
* ext/pathname/pathname.c (path_writable_real_p):
...
Pathname#writable_real? translated from pathname.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-12 21:46:04 +00:00