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

27375 Коммитов

Автор SHA1 Сообщение Дата
nobu 5381e4d1c0 hash.c: [DOC] orders do not matter [ci skip]
* hash.c (rb_hash_equal, rb_hash_eql): [DOC] the orders of each
  hashes are not compared.  [Bug #11508]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-04 23:29:01 +00:00
nobu 141ff8e6a0 win32.h: fix macro name
* include/ruby/win32.h: fix macro name for VC runtime version,
  RT_VER is only in Makefile.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-04 14:26:24 +00:00
hsbt 303c5a370e * doc/contributing.rdoc: fix configuration option.
[ci skip] [fix GH-1009]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-04 08:46:22 +00:00
ko1 970399a9ae * iseq.c (iseq_memsize): functions for wrapper object should have
iseqw_ prefix.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-03 19:48:12 +00:00
nobu 16dbb79e88 session.rb: SHA512
* lib/cgi/session.rb (create_new_id): use SHA512 instead of MD5.
  pointed out by SARWAR JAHAN.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-03 12:12:14 +00:00
ko1 5f6dedda01 * gc.c (rb_raw_obj_info): iseq->body->location.first_lineno is Fixnum.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-03 11:30:03 +00:00
nobu 2c357a5574 vm_eval.c: should be singular
* vm_eval.c (raise_method_missing): "names" should be singular.
  pointed out by Filip Bartuzi.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-03 08:57:47 +00:00
ko1 e25f9ceddf * gc.c (rb_raw_obj_info): should support IMEMO/iseq.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-03 08:51:05 +00:00
nobu e26ba49bd1 vm_eval.c: refine messages
* vm_eval.c (raise_method_missing): refine error messages when a
  symbol is not given.  [Fix GH-1013]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-03 01:07:52 +00:00
hsbt 4a14d94418 * ext/psych/*: merge psych master(8737e5b). It contains following fixes.
https://github.com/tenderlove/psych/pull/242
  https://github.com/tenderlove/psych/pull/246 [ruby-list:50219]
* test/psych/*: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-02 09:50:00 +00:00
ko1 0f35174060 * vm_insnhelper.h (GET_PC_COUNT): remove unused macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-02 09:05:16 +00:00
nobu d2f4d5a5fe Fix typo in Process.detatch doc [ci skip]
* process.c (proc_detach): [DOC] fix typo "intent" as "intend" in
  rdoc.  [Fix GH-1011]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-02 08:18:39 +00:00
nobu f9ac2106bf file.c: use filesystem encoding
* file.c (rb_realpath_internal): use filesystem encoding if the
  argument is in ASCII encodings.
* win32/file.c (rb_readlink): needs the result encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-02 07:58:24 +00:00
ko1 7ef01f83ac * test/thread/test_queue.rb: catch up last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-01 09:37:33 +00:00
ko1 c37c67cef8 * thread_sync.c (queue_do_close): ignore multiple close to allow
multiple producers.
  https://bugs.ruby-lang.org/issues/10600#note-14



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-01 09:17:28 +00:00
ko1 dcf6ac4975 * thread_tools.c: rename thread_tools.c to thread_sync.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-01 09:08:42 +00:00
ko1 15e48288fd * class.c (move_refined_method): should insert a write barrier
from an original class to a created (cloned) method entry.
* test/ruby/test_refinement.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-31 08:07:59 +00:00
nobu 9507c92d37 ChangeLog: table name
* ChangeLog: the table name instead of the table type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-30 02:34:40 +00:00
tenderlove 801e1fe46d * ext/openssl/ossl_ssl.c (static const struct): Only add SSLv3 support
if the SSL library supports it.  Thanks Kurt Roeckx <kurt@roeckx.be>
  [Bug #11376]

* ext/openssl/extconf.rb: check for SSLv3 support in the SSL
  implementation.

* test/openssl/test_ssl.rb (class OpenSSL): Skip tests that need SSLv3
  if there is no support.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-29 17:45:14 +00:00
hsbt 94c5f5a77c * lib/rdoc/*: Update rdoc master(cfffed5)
https://github.com/rdoc/rdoc/pull/337
  https://github.com/rdoc/rdoc/pull/367

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-28 07:05:17 +00:00
ko1 868c98dccf * vm.c (hook_before_rewind): prevent kicking :return event while
finishing vm_exec func because invoke_block_from_c() kick a :return
  event for bmethods.
  [Bug #11492]
* test/ruby/test_settracefunc.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-28 01:20:32 +00:00
hsbt 2ded8d0698 * lib/webrick/server.rb: use IO::NULL instead of '/dev/null'
* test/ruby/test_string.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-27 09:05:48 +00:00
ko1 d995d98a08 * compile.c (iseq_set_sequence): rename variable names
to make it readable.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-27 06:25:53 +00:00
ko1 fd7ac9f3c9 * thread_tools.c: add Queue#close(exception=false) and
SizedQueue#close(exception=false).
  [Feature #10600]
  Trying to deq from a closed empty queue return nil
  if exception parameter equals to false (default).
  If exception parameter is truthy, it raises
  ClosedQueueError (< StopIteration).
  ClosedQueueError inherits StopIteration so that you can write:
    loop{ e = q.deq; (using e) }
  Trying to close a closed queue raises ClosedQueueError.
  Blocking threads to wait deq for Queue and SizedQueue will be
  restarted immediately by returning nil (exception=false) or
  raising a ClosedQueueError (exception=true).
  Blocking threads to wait enq for SizedQueue will be
  restarted by raising a ClosedQueueError immediately.
  The above specification is not proposed specification, so that
  we need to continue discussion to conclude specification this
  method.
* test/thread/test_queue.rb: add tests originally written by
  John Anderson and modify detailed behavior.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 22:59:32 +00:00
nobu 5ce4bfc9d2 re.c: fix wchar match at EOS
* re.c (rb_memsearch_wchar, rb_memsearch_qchar): test matching
  till the end of string.  [ruby-core:70592] [Bug #11488]
* test/ruby/test_m17n.rb (test_include?, tet_index): add tests by
  Tom Stuart.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 01:52:04 +00:00
nobu 341c84ed22 id_table.c: fix for C89 compilers
* id_table.c (list_table_extend, hash_table_extend): remove C99
  features.  [ruby-dev:49239] [Bug #11487]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 00:26:02 +00:00
nobu 2e5c105ff2 win32.c: symlink
* win32/win32.c (w32_symlink): implement symlink().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-24 21:34:45 +00:00
nobu 7a89049a76 encoding.c: find encoding index
* encoding.c (rb_locale_encindex): find encoding index without
  making a string object every time.  [ruby-core:58160] [Bug #9080]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-24 07:01:22 +00:00
nagachika 73600fd6f8 * ChangeLog: fix a typo for r51665.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-22 18:28:19 +00:00
nagachika 5c88e7840c * ChangeLog: fix a typo for r51660.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-22 18:11:47 +00:00
nobu 2f8a4d317f vm_eval.c: cache results
* vm_eval.c (check_funcall_failed, check_funcall_missing): cache
  results of respond_to? and respond_to_missing?, and search a
  pulibc method only for compatibility with rb_respond_to.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-22 06:43:14 +00:00
nobu 84586cc4b4 ChangeLog: fix a typo
* ChangeLog: fix a usual typo, thraed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-22 01:31:20 +00:00
ko1 0de5e1cb87 * ext/thread/thread.c: move definitions of Queue, SizedQueue
and ConditionalVariables to thread_tools.c. In other wowrds,
  such classes are built-in.
  [Feature #8919]
  At first, I planned to embed only a Queue class.
  However, rubygems requires 'thread.rb' (rubygems are
  required at first, when launch MRI without --disable-gems).
  So most of people require 'thread.rb' as an embedded library.
  Now, ext/thread/thread.c is empty, only for a dummy for
  compatibility.
* thread.c: move a definition of Mutex class to thread_tools.c.
  And define Mutex class under Thread (so now Mutex is Thread::Mutex).
  Because other thread related classes are also defined under Thread.
  We remain ::Mutex as Thread::Mutex. Only an inspect result is changed.
* common.mk: add dependency from thread.o to thraed_tools.c.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-21 23:36:23 +00:00
ko1 7cf523c7db * vm_opts.h, iseq.c, iseq.h: add compile option to force frozen
string literals.
  [Feature #11473]
  This addition is not specification change, but to try frozen
  string literal world discussed on [Feature #11473].
  You can try frozen string literal world using this magical line:
    RubyVM::InstructionSequence.compile_option =
      {frozen_string_literal: true}
  Note that this is a global compilation option, so that you need to
  compile another script like that:
    p 'foo'.frozen? #=> false
    RubyVM::InstructionSequence.compile_option =
      {frozen_string_literal: true}
    p 'foo'.frozen? #=> false, because this line is already compiled.
    p eval("'foo'.frozen?") #=> true
  Details:
    * String literals are deduped by rb_fstring().
    * Dynamic string literals ("...#{xyz}...") is now only frozen,
      not deduped. Maybe you have other ideas.
  Now, please do not use this option on your productions :)
  Of course, current specification can be changed.
* compile.c: ditto.
* test/ruby/test_iseq.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-21 20:47:53 +00:00
tenderlove 226c6a1bdc * ext/psych/*: update to Psych 2.0.14
* test/psych/*: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-21 17:55:23 +00:00
ko1 885d781abc * ext/objspace/objspace.c: add a new method ObjectSpace.count_symbols.
[Feature #11158]
* symbol.c (rb_sym_immortal_count): added to count immortal symbols.
* symbol.h: ditto.
* test/objspace/test_objspace.rb: add a test for this method.
* NEWS: describe about this method.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-21 11:30:24 +00:00
nobu 18d8ba2594 Makefile.sub: link libraries for extensions
* win32/Makefile.sub ($(LIBRUBY_SO)): needs additional libraries
  for extension libraries to link statically.
  [ruby-core:70499] [Feature #9018]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-21 10:48:19 +00:00
ko1 3af5298e8c * include/ruby/ruby.h, cont.c, vm_trace.c: add a new event
fiber_switch. We need more discussion about this feature
  so that I don't write it on NEWS.
  [Feature #11348]
* test/ruby/test_settracefunc.rb: add tests.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-21 09:51:01 +00:00
ko1 416aa45918 * vm_insnhelper.c (vm_invoke_block): we should not expect ci->argc is
stable after invoking a block. [Bug #11451]
* test/ruby/test_yield.rb: add a test. This test script is given by
  Alex Dowad.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-21 08:37:46 +00:00
tenderlove f7af0318a3 * test/openssl/test_ssl_session.rb: Fix tests so that they take in to
account OpenSSL installations that have SSLv3 disabled by default.
  Thanks Jeremy Evans <code@jeremyevans.net> for the patches.
  [Bug #11366] [Bug #11367]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-20 21:39:54 +00:00
kazu 777f319d8c fix indent (tabify) [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-20 13:22:38 +00:00
nobu 0970a928ef vm_eval.c: redefined respond_to_missing?
* vm_method.c (basic_obj_respond_to): call respond_to_missing?
  only when redefined.  [ruby-core:70460] [Bug #11465]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-20 13:19:21 +00:00
nobu 629d26ef3a vm_eval.c: share with rb_obj_respond_to
* vm_eval.c (check_funcall_respond_to): share the behavior with
  rb_obj_respond_to.  [ruby-core:70460] [Bug #11465]
* vm_method.c (vm_respond_to): extract from rb_obj_respond_to and
  merge r39881.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-20 05:13:28 +00:00
nobu 24da2db3e1 vm_method.c: reuse method entry
* vm_method.c (rb_obj_respond_to): reuse found method entry
  instead of searching same entry repeatedly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-19 23:53:12 +00:00
nobu 82da3da5ac win32.c: support known reparse points only
* dir.c (replace_real_basename), win32/win32.c (opendir_internal):
  check reparse point tags and treat supported tags only as
  symbolic links.  [ruby-core:70454] [Bug #11462]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-19 23:31:19 +00:00
tenderlove 036fe23b26 * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): add OP_ALL to
existing options rather than just setting it.  Some vendors apply
  custom patches to their versions of OpenSSL that set default values
  for options.  This commit respects the custom patches they've
  applied.

* test/openssl/test_ssl.rb (class OpenSSL): check that OP_ALL has been
  added to the options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-19 14:59:58 +00:00
nobu c670b75ec2 process.c: [DOC] env values in spawn [ci skip]
* process.c (rb_f_spawn): [DOC] elaborate environment variable
  values.  [ruby-core:70456] [Bug #11463]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-19 14:55:32 +00:00
nobu 006fad3fe3 win32.c: support known reparse points only
* win32/win32.c (winnt_lstat): check reparse point tags and treat
  supported tags only as symbolic links.
  [ruby-core:70454] [Bug #11462]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-19 14:48:09 +00:00
naruse 3816f7574f * thread_pthread.c (reserve_stack): ensure the memory is really
allocated. [Bug #11457]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-18 11:21:50 +00:00
nobu 0958af2ad4 parse.y: fix labelarg
* parse.y (IS_BEG): include labeled argument state, which was
  EXPR_LABELARG.  [ruby-dev:49221] [Bug #11456]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-18 08:19:24 +00:00