Commit graph

29857 commits

Author SHA1 Message Date
nagachika
0c91b2493c merge revision(s) 40925: [Backport #8451]
* dir.c (bracket): fix copy-paste error.  When the first and last
	  characters of fnmatch range have different length, fnmatch may
	  have wrongly matched a path that does not really match.
	  Coverity Scan found this bug.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-04 15:09:53 +00:00
nagachika
28b7866304 merge revision(s) 40920: [Backport #8450]
* string.c (rb_str_quote_unprintable): check if argument is a string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-04 15:05:58 +00:00
nagachika
90490d6732 merge revision(s) 39637,40900: [Backport #8440]
load.c: reorder conditions

	* load.c (loaded_feature_path): reorder conditions so simple
  comparision comes first.
	* load.c (loaded_feature_path): fix invalid read by index underflow.
	  the beginning of name is also a boundary as well as just after '/'.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-04 14:47:15 +00:00
nagachika
205b5c9cd6 merge revision(s) 40915: [Backport #8448]
* variable.c (set_const_visibility): use rb_frame_this_func() instead
	  of rb_frame_callee() for getting the name of the called method

	* test/ruby/test_module.rb: add test for private_constant with no args


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-04 14:34:56 +00:00
nagachika
2392c12bd1 merge revision(s) 40992: [Backport #8040]
* vm_insnhelper.c (vm_callee_setup_keyword_arg,
	  vm_callee_setup_arg_complex): consider a hash argument for keyword
	  only when the number of arguments is more than the expected
	  mandatory parameters.  [ruby-core:53199] [ruby-trunk - Bug #8040]

	* test/ruby/test_keyword.rb: update a test for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-04 14:30:28 +00:00
nagachika
e377d3bb75 merge revision(s) 40887,40888,40894,40896: [Backport #8431]
* win32/win32.c (setup_overlapped, finish_overlapped): extract from
	  rb_w32_read() and rb_w32_write().

	* win32/win32.c (setup_overlapped): check the error code in addition
	  to the result of SetFilePointer() to determine if an error occurred,
	  because INVALID_SET_FILE_POINTER is a valid value.
	  [ruby-core:55098] [Bug #8431]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-03 15:49:06 +00:00
nagachika
e6ae0db36e merge revision(s) 40791,40806: [Backport #8424]
* eval_intern.h (TH_PUSH_TAG): ensure jmpbuf to be accessible before
	  pushing tag to get rid of unaccessible tag by stack overflow.

	* vm_core.h (rb_vm_tag): move jmpbuf between tag and prev so ensure to
	  be accessible.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-03 15:27:24 +00:00
nagachika
44658707d2 merge revision(s) 40807: [Backport #8416]
* compile.c (iseq_compile_each): forward anonymous and first keyword
	  rest argument one.  [ruby-core:55033] [Bug #8416].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-03 14:57:36 +00:00
nagachika
6f617028a4 merge revision(s) 41026: [Backport #8242]
* range.c: Fix rdoc on Range#bsearch [Bug #8242] [ruby-core:54143]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-02 13:39:50 +00:00
nagachika
7e53569b1d * ChangeLog: update patchlevel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 22:57:16 +00:00
svn
4c678b4eae * 2013-05-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 19:01:48 +00:00
zzak
4f8094d294 * lib/yaml.rb: YAML documentation from #8344 [Bug #8355]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 19:01:43 +00:00
nagachika
99035ca262 * include/ruby/intern.h: should include sys/time.h for struct timeval
if it exists. [ruby-list:49363]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-15 14:41:57 +00:00
nagachika
6ff931d604 merge revision(s) 39491: [Backport #8403]
* lib/rubygems/config_file.rb:  Lazily load .gem/credentials to only
	  check permissions when necessary.  RubyGems bug #465

	* test/rubygems/test_gem_config_file.rb:  Test for the above.

	* test/rubygems/test_gem_commands_push_command.rb:  Remove duplicated
	  test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14 11:23:11 +00:00
nagachika
19f0852363 merge revision(s) 40728:
* ext/dl/lib/dl/func.rb (DL::Function#call): check tainted when
	  $SAFE > 0.

	* ext/fiddle/function.c (function_call): check tainted when $SAFE > 0.

	* test/fiddle/test_func.rb (module Fiddle): add test for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-14 11:13:40 +00:00
nagachika
25e5b66798 merge revision(s) 40664:
* signal.c (rb_f_kill): fixes typo. s/HAS_KILLPG/HAVE_KILLPG/.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 13:43:02 +00:00
nagachika
baf52faa03 merge revision(s) 40652:
fix a typo

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12 12:29:44 +00:00
nagachika
7fc0105f65 merge revision(s) 40606,40607,40635: [Backport #8375]
test_scanner_events.rb: assert_location

	* test/ripper/test_scanner_events.rb (TestRipper#assert_location):
  rename so skipped in backtraces.
	* parse.y (parser_yylex): fail if $, @, @@ are not followed by a valid
	  name character.  [ruby-core:54846] [Bug #8375].

	* parse.y (parser_peek_variable_name): treat invalid global, class,
	  and instance variable names as mere strings rather than errors.
	  [ruby-core:54885] [Bug #8375]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-11 19:33:51 +00:00
nagachika
1c0abbf076 merge revision(s) 39636,39741,40454: [Backport #8071] [Backport #8387]
configure.in: suppress error messages

	* configure.in: suppress error messages, rm: cannot remove
  'conftest.dSYM', from AC_EGREP_CPP with CFLAGS=-g on Darwin.
	* configure.in (rm, shvar_to_cpp, unexpand_shvar): local is not
	  available on old shells.

	* configure.in (shvar_to_cpp): escape quotes for old shells.
	  [Bug #7959] [Bug #8071]

	* configure.in (RUBY_RM_RECURSIVE): this hack is needed by only
	  autoconf 2.69 or earlier on darwin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-11 18:12:02 +00:00
nagachika
2c240c5e49 merge revision(s) 40612,40614: [Backport #8025]
* class.c (rb_mod_included_modules): should not include the original
	  module itself.  [ruby-core:53158] [Bug #8025]

	* class.c (rb_mod_included_modules): should not include non-modules.
	  [ruby-core:53158] [Bug #8025]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-09 14:54:27 +00:00
nagachika
4c1f8acd2a merge revision(s) 40583,40584,40585,40590: [Backport #8367]
* insns.def (defined): get method entry from the method top level
	  frame, not block frame.  [ruby-core:54769] [Bug #8367]

	* insns.def (defined): use vm_search_superclass() like as normal super
	  call.  based on a patch <https://gist.github.com/wanabe/5520026> by
	  wanabe.

	* vm_insnhelper.c (vm_search_superclass): return error but not raise
	  exceptions.

	* vm_insnhelper.c (vm_search_super_method): check the result of
	  vm_search_superclass and raise execptions on error.
	  vm_search_superclass and raise exceptions on error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-08 14:38:43 +00:00
nagachika
555035a349 merge revision(s) 40208: [Backport #8380]
* internal.h (MUL_OVERFLOW_SIGNED_INTEGER_P): New macro.
	  (MUL_OVERFLOW_FIXNUM_P): Ditto.
	  (MUL_OVERFLOW_LONG_P): Ditto.

	* array.c (rb_ary_product): Don't overflow on signed integer
	  multiplication.

	* numeric.c (fix_mul): Ditto.
	  (int_pow): Ditto.

	* rational.c (f_imul): Ditto.

	* insns.def (opt_mult): Ditto.

	* thread.c (sleep_timeval): Don't overflow on signed integer addition.

	* bignum.c (rb_int2big): Don't overflow on signed integer negation.
	  (rb_big2ulong): Ditto.
	  (rb_big2long): Ditto.
	  (rb_big2ull): Ditto.
	  (rb_big2ll): Ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-07 16:49:01 +00:00
nagachika
b6f0a306a6 * test/ruby/test_thread.rb (invoke_rec): extend timeout 10 -> 50 sec,
to investigate test failure on rubyci.
  20130507T052909Z.log.html.gz


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-07 11:18:00 +00:00
nagachika
e5463b4c3f merge revision(s) 40587:
* lib/cgi/session.rb: Fix a typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-05 16:08:53 +00:00
nagachika
8aceebf8a1 merge revision(s) 40586:
* doc/syntax/refinements.rdoc : Fix a missing quote
  Patch by Robin Dupret. [Fix GH-271]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-05 16:08:19 +00:00
svn
649d6f47d2 * 2013-05-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-04 15:00:23 +00:00
nagachika
ec1f8cbb7a merge revision(s) 40574:
* doc/security.rdoc: Add note about reporting security vulns


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-04 15:00:17 +00:00
nagachika
f824c6f15f merge revision(s) 40561: [Backport #8357]
* object.c (rb_obj_is_kind_of): skip prepending modules.
	  [ruby-core:54742] [Bug #8357]

	* object.c (rb_class_inherited_p): ditto.
	  [ruby-core:54736] [Bug #8357]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-04 14:48:20 +00:00
nagachika
453bb57d55 merge revision(s) 39939: [Backport #8360]
* thread.c (double2timeval): convert the infinity to TIME_MAX to avoid
	  SEGV by Thread.new {}.join(Float::INFINITY) on
	  Debian GNU/Linux (amd64).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-02 14:40:29 +00:00
nagachika
5362d2e2cb merge revision(s) 40498:
* thread_pthread.c (ruby_init_stack): Add STACK_GROW_DIR_DETECTION.
	  This fixes a compilation failure while cross-compiling for Tensilica
	  Xtensa Processor.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-01 15:40:57 +00:00
nagachika
83222f7c65 merge revision(s) 40478: [Backport #8334]
* dir.c (dir_set_pos): Fix a compilation error when seekdir() is not
	  exist.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-01 15:20:10 +00:00
nagachika
72c4bf29dd merge revision(s) 40504,40505,40507,40511: [Backport #7982]
* README.EXT: Add note to warn use of %i in Exceptions [Bug #7982]

	* README.EXT: Update note from r40504, by Jeremy Evans [Bug #7982]

	* README.EXT: Copy note from r40505 for rb_sprintf() [Bug #7982]

	* README.EXT: correct method name to be used.  [Bug #7982]

	* README.EXT.ja: add notes too.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-01 15:17:22 +00:00
svn
4dfec53d19 * 2013-05-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-01 15:14:14 +00:00
nagachika
682e5bef21 merge revision(s) 39932,39934,39935,39937,39955,40491:
Use assert_separately to speed up on test-all

	This creates large string and it pressure GC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-01 15:14:08 +00:00
nagachika
4d3df433e9 merge revision(s) 40462: [Backport #8323]
* io.c (rb_io_ext_int_to_encs, parse_mode_enc): bom-prefixed name is
	  not a real encoding name, just a fallback.  so the proper conversion
	  should take place even if if the internal encoding is equal to the
	  bom-prefixed name, unless actual encoding is equal to the internal
	  encoding.  [ruby-core:54563] [Bug #8323]

	* io.c (io_set_encoding_by_bom): reset extenal encoding if no BOM
	  found.  [ruby-core:54569]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-01 14:52:52 +00:00
nagachika
506ee0c160 merge revision(s) 39687,39776,40438: [Backport #8064]
* io.c (rb_update_max_fd): use ATOMIC_CAS because this function
	  is used from timer thread too.

	* io.c (rb_fd_fix_cloexec): use rb_update_max_fd().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-26 17:31:33 +00:00
nagachika
f2d84ac8a1 * configure.in: use quadrigraphs. workaround for autoconf 2.64.
a patch provided by Hessob Park. [ruby-core:53157] [Backport #8020]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-26 17:06:19 +00:00
nagachika
c72e5e70d9 merge revision(s) 40413,40414,40415,40423: [Backport #8290]
* string.c (rb_str_inspect): NUL should not be represented as
	  "\0" when octal digits may follow.

	* string.c (rb_str_inspect): NUL should not be represented as "\0"
	  when octal digits may follow.  [ruby-core:54458] [Bug #8290]

	* test/ruby/test_module.rb
	  (TestModule#test_const_get_invalid_name)
	  (test_const_defined_invalid_name): Fix expected values.

	* string.c (rb_str_inspect): refix r40413, on Ruby 1.9 usual character
	  escape uses hex/Unicode escapes, so fix to use Unicode escape on
	  Unicode strings and hex on others. [ruby-core:54458] [Bug #8290]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-26 16:15:17 +00:00
nagachika
a2ac434a07 merge revision(s) 40476: [Backport #8332]
* thread_pthread.c (ruby_init_stack): Add STACK_GROW_DIR_DETECTION.
	  This fixes a compilation failure while cross-compiling for ARM.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-26 14:49:26 +00:00
nagachika
4a90d9e8a5 merge revision(s) 40475,40480,40481:
* lib/rss/atom.rb: Documentation for RSS::Atom based on a patch by
	  Michael Denomy

	* lib/rss/maker.rb: Documentation for RSS::Maker also by @mdenomy

	* lib/rss/maker.rb (RSS::Maker): Fix indent of document comment.

	* lib/rss/atom.rb (RSS::Atom::Entry): Fix indent of document comment.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-26 14:32:49 +00:00
nagachika
6fd0dac2fa merge revision(s) 40455:
* array.c: Improve rdoc for eql?

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-25 13:18:38 +00:00
nagachika
7cc4acd442 merge revision(s) 40441:
update doc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-24 15:43:05 +00:00
nagachika
917f13a953 merge revision(s) 40440:
update doc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-24 15:42:02 +00:00
nagachika
02d1ebe360 merge revision(s) 40437:
* numeric.c: Fix wiki link on Float imprecision in overview, patched
	  by Makoto Kishimoto [Bug #8304] [ruby-dev:47280]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-24 15:40:52 +00:00
nagachika
8a4fa092e2 merge revision(s) 40435:
Typo by @windwiny [Fixes GH-295]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-24 15:40:25 +00:00
nagachika
072ac9a200 merge revision(s) 40434:
* string.c: Document String#setbyte return value by @gjmurakami-10gen
	  [Fixes GH-294]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-24 15:39:32 +00:00
nagachika
1914720cba merge revision(s) 40431:
* ext/socket/lib/socket.rb: Doc typos by @vipulnsward [Fixes GH-292]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-24 15:38:37 +00:00
nagachika
c967493b65 merge revision(s) 40346: [Backport #8284]
* vm_method.c (rb_mod_public_method): fix visibility on anonymous
	  module. set visibility of singleton method, not method in base
	  class.  [ruby-core:54404] [Bug #8284]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-23 14:32:49 +00:00
nagachika
96de351eed merge revision(s) 40419: [Backport #8281]
* lib/net/imap.rb (getacl_response): parse the mailbox of an ACL
	  response correctly.  [ruby-core:54365] [Bug #8281]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-23 13:51:36 +00:00
nagachika
69da79fafc merge revision(s) 40418:
typo s/Singelton/Singleton


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-23 13:26:24 +00:00