Граф коммитов

42594 Коммитов

Автор SHA1 Сообщение Дата
nobu be9699a250 test_dir.rb: Dir.empty? with dot file
* test/ruby/test_dir.rb (test_empty): check with a dot file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 15:14:03 +00:00
svn 5b24766d69 * 2016-02-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 15:00:11 +00:00
nobu 527a1eb065 ChangeLog: remove duplicate entry [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 15:00:10 +00:00
kazu 19413ef43b fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 14:33:31 +00:00
usa 6202b67dd2 * test/ruby/test_dir.rb (TestDir#test_empty?): fix a platform dependent test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 14:21:57 +00:00
nobu 0201900d76 id.def: $~ and $_
* defs/id.def (predefined): add idLASTLINE and idBACKREF for $~
  and $_ respectively.
* parse.y: use idLASTLINE and idBACKREF instead of rb_intern.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 12:42:00 +00:00
nobu 5a6a502ef9 string.c: fix rb_str_init
* string.c (rb_str_init): fix segfault and memory leak, consider
  wide char encoding terminator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 11:24:09 +00:00
naruse d092fc5398 Additional fix and tests for r53851
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 10:15:28 +00:00
nobu c00d51c739 assertions.rb: fix assert_no_memory_leak
* test/lib/test/unit/assertions.rb (assert_no_memory_leak): fix
  path of memory_status.rb, as this method has been moved.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 08:29:58 +00:00
nobu b6053df008 remove unnecessary declaration so that rdoc works
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 07:37:20 +00:00
naruse 49dee548f4 fix rubyspec error from r53850
http://rubyci.s3.amazonaws.com/tk2-243-31075/ruby-trunk/log/20160217T061402Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 07:24:13 +00:00
naruse d46e2aea71 * string.c (rb_str_init): introduce String.new(capacity: size)
[Feature #12024]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 03:21:35 +00:00
nobu a8f4398602 numeric.c: adjust types
* numeric.c (coerce_rescue, coerce_rescue_quiet): rescue functions
  should have errinfo too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 02:54:50 +00:00
svn 9f6ba3f102 * 2016-02-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 02:38:09 +00:00
nobu e18654fff2 numeric.c: adjust types
* numeric.c (coerce_body, coerce_rescue, coerce_rescue_quiet):
  adjust parameter types for rb_rescue.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17 02:38:09 +00:00
kazu cee9c58ef2 fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-16 12:25:54 +00:00
kazu 45aa35cd5d fix indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-16 12:25:53 +00:00
kazu 0395a51ea7 ChangeLog should be us-ascii [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-16 12:25:51 +00:00
duerst 6a808bda64 * enc/unicode/case-folding.rb, casefold.h: Used only first element
(rather than all) of target in CaseUnfold_11 array.
  (with Kimihito Matsui)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-16 10:10:37 +00:00
nobu 527fa61087 numeric.c: fix segfault
* numeric.c (compare_with_zero): fix variable name, rb_cmperr
  requires VALUEs but not an ID.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-16 09:25:08 +00:00
nobu 135a171ce1 dir.c: Dir.empty?
* dir.c (rb_dir_s_empty_p): add Dir.empty? method, which tells the
  argument is the name of an empty directory.  [Feature #10121]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-16 08:34:47 +00:00
nobu 9cedfbcb91 rbinstall.rb: drive letter in without_destdir
* tool/rbinstall.rb (without_destdir): just strip a drive letter
  which is prepended by with_destdir.
  pointed out by @DavidEGrayson.
  https://github.com/ruby/ruby/commit/0e5f9ae#commitcomment-16101763

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-16 00:51:48 +00:00
naruse 2708fb6ba7 * insns.def (opt_plus): simply use LONG2NUM() instead of wrongly
complex overflow case.

* insns.def (opt_sub): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 19:42:59 +00:00
nobu 0e5f9aeaea rbinstall.rb: drive letter in without_destdir
* tool/rbinstall.rb (without_destdir): compare with the destdir
  after stripping a drive letter, on dosish platforms.
  pointed out by @DavidEGrayson.
  https://github.com/ruby/ruby/commit/d0cf23b#commitcomment-16100407

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 17:50:08 +00:00
svn afc0a5f04c * 2016-02-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 17:41:47 +00:00
nobu 8b019eed78 parse.y: short circuit by result
* parse.y (parse_ident): short circuit by result, as only
  tIDENTIFIER can be a local variable, but tFID and tCONSTANT not.
  fix up r53834.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 17:41:46 +00:00
nobu fbb51ff44c parse.y: kwarg to method with same name variable
* parse.y (parse_ident): allow keyword arguments just after a
  method where the same name local variable is defined.
  [ruby-core:73816] [Bug#12073]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 06:44:36 +00:00
nobu 5e59be3edd parse.y: simplify local ID condition
* parse.y (tokenize_ident, parse_ident): ident in tokenize_ident()
  can be a local id only when called from parse_ident(), but never
  from parse_gvar() and parse_atmark().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 06:06:31 +00:00
duerst c3554cdea6 * enc/unicode/case-folding.rb: Added debugging option
(with Kimihito Matsui)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 05:43:55 +00:00
nobu 49079911ba bignum.c: micro optimization
* bignum.c (rb_big_uminus, bigsub_int): use BIGNUM_NEGATE.

* internal.h (BIGNUM_NEGATE): simplify negation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 05:15:33 +00:00
nobu 174be80027 use particlar macros
* bignum.c: use particlar macros for positive/negative conditions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 05:09:59 +00:00
nobu 73e29d2cf1 win32/resolv.rb: invert the condition
* ext/win32/lib/win32/resolv.rb: invert the condition to return
  immediately in the future.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 04:23:15 +00:00
nobu 486f3f4270 win32/resolv.rb: check pointer size
* ext/win32/lib/win32/resolv.rb: check pointer size first, NT if
  it is larger than 4 as Windows 9X are 32-bit mode only.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 03:42:09 +00:00
nobu 0f5a841881 avoid ruby-mode.el bug
* ext/win32/lib/win32/{resolv,resolv9x}.rb: get rid of
  ruby-mode.el of Emacs 24.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 03:29:00 +00:00
svn a1feed6551 * 2016-02-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 03:29:00 +00:00
nobu 2ece5109d6 split win32/resolv9x.rb
* ext/win32/lib/win32/resolv9x.rb: split code for Windows 9x from
  resolv.rb.  now it is rarely used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-15 03:28:59 +00:00
nobu 8a180ee4b7 test_cgi_util.rb: test_cgi_unescapeHTML_invalid
* test/cgi/test_cgi_util.rb (test_cgi_unescapeHTML_invalid): test
  for invalid escaped HTML, borrowed from rubyspec.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-14 08:52:38 +00:00
nobu 65c9555d88 test_exception.rb: fix commit miss
* test/ruby/test_exception.rb: remove duplicate method.  fix
  commit miss at r53819.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-14 08:37:05 +00:00
nobu fdcc924fce mkmf.rb: Do not modify caller strings
* lib/mkmf.rb (with_{cpp,c,ld}flags): copy caller strings not to
  be modified, in append_{cpp,c,ld}flags respectively.
  [Fix GH-1246]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-14 08:32:15 +00:00
svn a7a5bd5903 * 2016-02-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-14 07:19:23 +00:00
nobu e294f4cfdf not overwrite cause
* eval.c (setup_exception): set the cause only if it is explicitly
  given or not set yet.  [Bug #12068]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-14 07:19:23 +00:00
akr f061d40326 * hash.c (rb_hash_invert): [DOC] more examples.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-13 12:45:59 +00:00
nobu 1ee9cad027 CIDR in no_proxy
* lib/uri/generic.rb (URI::Generic#find_proxy): support CIDR in
  no_proxy.  [ruby-core:73769] [Feature#12062]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-13 08:31:12 +00:00
nobu 423d042371 no_proxy with whitespaces and leading dots
* lib/uri/generic.rb (find_proxy): exclude white-spaces and allow
  for a leading dot in the domain name in no_proxy.
  [ruby-core:54542] [Feature #8317]

The previous implementation wouldn't allow for white-spaces nor a leading dot
in the domain name. The latter is described in the wget documentation as a valid case.

By being more strict on the characters, which are counted to a domainname,
we allow for white-spaces.
Also, a possible leading dot will be handled gracefully.

[Fix GH-285]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-13 08:12:21 +00:00
nobu 1b6684f878 test/uri/test_generic.rb: split test_find_proxy
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-13 07:52:25 +00:00
svn 7e06731b99 * 2016-02-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-13 02:00:55 +00:00
nobu 1a222cd357 domainname no_proxy assertions
* test/uri/test_generic.rb (test_find_proxy): assertions for
  no_proxy of domainname.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-13 02:00:54 +00:00
nobu 434fc4c8a0 drbtest.rb: make command an array
* test/drb/drbtest.rb (DRbService): make @@ruby an array to be
  consistent with r35424.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-12 04:24:10 +00:00
nobu 6bbe44a39a error.c: fix doc [ci skip]
* error.c (name_err_initialize, nometh_err_initialize): [DOC] fix
  argument positions.  optional parameters except for the message
  are placed at the last.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-12 03:21:17 +00:00
nobu 0a19e7f0a3 net/ftp.rb: NullSocket#closed?
* net/ftp.rb: add NullSocket#closed? to fix closing not opened
  connection.  [Fix GH-1232]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-12 02:50:09 +00:00