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

36286 Коммитов

Автор SHA1 Сообщение Дата
ngoto ca1c23e2a7 * test/ruby/envutil.rb (assert_no_memory_leak): On Solaris 9 or later,
if possible, execute child ruby with environment variables
  LD_PRELOAD=libumem.so UMEM_OPTIONS="backend=mmap". With these
  variables, freed memory is immediately returned to the OS.
  [Bug #10020] [ruby-dev:48391]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 16:32:07 +00:00
nobu 47adf5709a symbol.c: remove dependency on parse.h
* symbol.c (op_tbl): remove non-regular symbols.

* symbol.c (global_symbols): start from the next of the preserved
  ID.

* symbol.c: (rb_id2str): op_tbl does not exceed tLAST_OP_ID.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 14:10:50 +00:00
kazu f063a0b535 fix plural form [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 13:58:02 +00:00
nobu d33d22c7a0 parse.y: rename Init_parser
* parse.y (rb_init_parse): rename to get rid of name clash with
  json/parser at statically linking.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 13:52:47 +00:00
svn 803232c8bb * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 11:51:04 +00:00
suke 610877045a * ext/win32ole/win32ole.c: add WIN32OLE_RECORD class to support
VT_RECORD OLE variables.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 11:50:51 +00:00
hsbt 28cdf9b1d1 * lib/abbrev.rb: remove executable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 08:16:05 +00:00
hsbt c2eac0e78c * lib/fileutils.rb: handle ENOENT error with symlink targeted to
non-exists file. [ruby-dev:45933] [Bug #6716]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 07:51:19 +00:00
hsbt 94bbd10ea7 * array.c: Clarify documentation for Array#insert.
[ruby-core:62934] [Bug #9901]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 07:00:49 +00:00
hsbt dcf296f74c * io.c: Improve Documentation by @dapplebeforedawn.
[fix GH-658] [ruby-core:63579] [Bug #10012]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 06:41:44 +00:00
marcandre 72d0536606 * lib/matrix.rb: Fix sign for cross_product [#9499]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 05:19:33 +00:00
ko1 9412551ee2 * benchmark/prepare_so_k_nucleotide.rb: use require_relative.
* benchmark/prepare_so_reverse_complement.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 02:13:09 +00:00
nobu 8a608d2b1f pack.c: fix buffer overrun
* pack.c (encodes): fix buffer overrun by tail_lf.  Thanks to
  Mamoru Tasaka and Tomas Hoger.  [ruby-core:63604] [Bug #10019]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-11 01:09:05 +00:00
svn 70451a56ed * 2014-07-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-10 15:22:23 +00:00
ngoto 90b1b2e607 * hash.c (ruby_setenv): Fix TestEnv#test_aset failure on Solaris 9.
When name contains '=', ruby_setenv raises Errno::EINVAL.
  That is the same behavior as Solaris 10.
  NULL check for malloc return value is also added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-10 15:22:07 +00:00
nobu 813ad48975 vm_insnhelper.c: fix implicit splat keyword argument
* vm_insnhelper.c (vm_callee_setup_keyword_arg): adjust VM stack
  pointer to get rid of overwriting splat arguments by arguments
  for `to_hash` conversion.  [ruby-core:63593] [Bug #10016]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-10 06:02:54 +00:00
kazu 01bced94a9 fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-10 04:17:52 +00:00
nobu ef3ff64933 gc.c: fix typo
* gc.c (global_list): fix typo, capital 'L'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-10 03:24:17 +00:00
ko1 96815f1ebe * symbol.c: remove rb_gc_mark_symbols().
fstrings refered by static symbols and pinned dynamic symbols
  are registerd by rb_gc_register_mark_object().
  frstring refered by dynamic symbols (not pinned symbols)
  are refered from global_symbols.dsymbol_fstr_hash (Hash object).
  Note that fstrings refered from dynamic symbols must live loger
  than symbol objects themselves because rb_gc_free_dsymbol() uses
  fstring to remove from symbol tables.
  This is why we can not mark fstrings from dynamic symbols.
  This technique reduces root objects for GC marking.
* gc.c (gc_mark_roots): ditto.
* internal.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09 16:19:13 +00:00
svn 996ff90744 * 2014-07-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09 15:29:14 +00:00
ngoto 60ee5e03f1 * common.mk (DTRACE_DEPENDENT_OBJS): fix build failure on Solaris
introduced in r46768. Object files containing dtrace probes should
  be listed in DTRACE_DEPENDENT_OBJS.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09 15:28:53 +00:00
nobu 90173785a8 random.c: fix casts
* random.c (fill_random_seed): fix type to cast.  this may or may
  not suppress warnings by icc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09 14:51:26 +00:00
nobu 94ce481263 symbol.c, symbol.h: split from parse.y
* symbol.c, symbol.h: Symbol class implementation and internals,
  split from parse.y.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09 08:07:32 +00:00
nobu d299250afa parse.y: adjust argument types
* parse.y (symbols_i): adjust argument types for st_foreach()
  using st_data_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09 07:31:42 +00:00
nobu 92a04a4915 io.c: refine error message
* io.c (do_io_advise): more precise error message, with arguments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09 07:19:43 +00:00
nobu 209314c274 test_io.rb: fix assertion
* test/ruby/test_io.rb (test_advise): fix inverted arguments order
  by assert_nil.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09 07:19:31 +00:00
ko1 76a929a7fc * parse.y: change Symbol <-> ID relationship to avoid
exposing IDs from collectable symbols.
  [Bug #10014]
  Now, rb_check_id() returns 0 if corresponding symbol is
  pinned dynamic symbol.
  There is remaining intern_cstr_without_pindown(), it can return
  IDs from collectable symbols. We must be careful to use it
  (only used in parse.y).  I think it should be removed if
  it does not have impact for performance.
* parse.y:
  add:
  * STATIC_SYM2ID()
  * STATIC_ID2SYM()
  rename:
  * rb_pin_dynamic_symbol() -> dsymbol_pindown()
* internal.h:
  remove:
  * rb_check_id_without_pindown()
  * rb_sym2id_without_pindown()
  add:
  * rb_check_symbol()
  * rb_check_symbol_cstr()
* load.c: use rb_check_id() or rb_check_id_cstr().
* object.c: ditto.
* struct.c: ditto.
* thread.c: ditto.
* vm_method.c: ditto.
* string.c (sym_find): use only rb_check_symbol().
* sprintf.c (rb_str_format): use rb_check_symbol_cstr().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09 06:14:41 +00:00
ko1 37f018fdf5 * parse.y (symbols_i): delete garbage symbols for Symbol.all_symbols.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09 05:00:53 +00:00
naruse 9db5a7f82e require "rbconfig" to use RbConfig
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09 02:31:05 +00:00
normal b10058ae36 thread_pthread.h: do not expose pthread type for lock
* thread_pthread.h (struct rb_global_vm_lock_struct):
  do not expose pthread type for lock

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-08 20:50:37 +00:00
normal 3e14cdc45b thread_pthread.h: remove unneeded semaphore.h include
* thread_pthread.h: remove unneeded semaphore.h include
  We currently do not use POSIX semaphores.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-08 20:47:58 +00:00
svn a402e84eff * 2014-07-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-08 15:19:46 +00:00
keiju 44ab0f8b3a * lib/irb/ruby-lex.rb: fix counting indent in identify_string_dvar.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-08 15:19:30 +00:00
kazu aae3bcbc25 fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-08 13:14:01 +00:00
nobu 8b427e357b sprintf.c: skip non-interned name
* sprintf.c (rb_str_format): get rid of accessing by symbol of
  invalid ID, when the name is not interned.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-08 08:04:12 +00:00
nobu 286eaeb24f memory_status.rb: find proper ps
* test/ruby/memory_status.rb (Memory::PSCMD): use ps command which
  outputs expected result.  [ruby-dev:48370] [Bug #10010]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-08 07:58:03 +00:00
nobu 65accad30a parse.y: expand is_asgn_or_id
* parse.y (new_op_assign_gen): expand is_asgn_or_id(), which call
  id_type() function multiple times now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-08 07:01:10 +00:00
svn 7defa3836a * 2014-07-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-08 05:48:49 +00:00
ko1 fd7073f7aa * parse.y (dsymbol_alloc): set global_symbols.minor_marked to 0.
* parse.y (dsymbol_check): set RSYMBOL(sym)->fstr to 0
  because we should not touch fstr after that.
* parse.y (rb_gc_free_dsymbol): skip deleting str and sym
  from tables if fstr == 0.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-08 05:48:36 +00:00
nobu a560c2086a test/ruby/find_executable.rb
* test/ruby/test_rubyoptions.rb (test_program_name): use expected
  ps command from PATH.

* test/ruby/find_executable.rb (EnvUtil#find_executable): find
  expected executable path with argument and output pattern.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-07 08:42:57 +00:00
nobu b1f4bf8aa2 common.mk: integrate clean targets
* common.mk (clean-rdoc, clean-capi, clean-platform): integrate
  from Makefile.in and win32/Makefile.sub.

* win32/Makefile.sub (RMALL): now use rm.bat instead of rmall.bat
  which does not handle any options and convert slashes.

* win32/rmall.bat: no longer used.  use rm.bat with -r instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-07 07:08:06 +00:00
ko1 8572ed5c0d * parse.y: remove global_symbols::pinned_dsym
(and ::pinned_dsym_minor_marked).
  Mark pinned dsymbols by rb_gc_register_mark_object() because
  they are immortal.
* prase.y (rb_gc_free_dsymbol): rename parameter name `ptr' to `sym'.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-07 05:36:25 +00:00
ko1 2e225e2c8b * gc.c: revert miss-commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-07 03:46:15 +00:00
ko1 2c551e4715 * parse.y: need to use updated (re-created) symbols.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-07 03:42:42 +00:00
naruse 011b74b748 * tool/mkconfig.rb: remove not to require rbconfig/obsolete.rb.
* lib/rbconfig/obsolete.rb: removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-07 02:07:01 +00:00
ko1 a31219c91c * parse.y: do not use rb_gc_resurrect(), but create a new dynamic
symbol for garbage dynamic symbol.
* common.mk: use gc.h by parse.y.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-07 01:53:54 +00:00
nobu 69e9b27a28 string.c: do not use garbage object
* string.c (fstr_update_callback): should not access garbage
  object contents, copy from the argument instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-06 23:47:17 +00:00
ko1 7ad35210a3 * string.c (fstr_update_callback): do not use rb_gc_resurrect()
any more.
  Make new frozen string and replace with garbage frozen string.
* common.mk: use gc.h from string.c.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-06 17:20:30 +00:00
ko1 2006bfe2f4 * gc.c: rename is_dying_object() to is_garbage_object().
* gc.h: rb_objspace_garbage_object_p() as an exported function.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-06 15:42:14 +00:00
nobu 6a9b242a80 st.c: fix uninitialized variable
* st.c (st_update): old_key is uninitialized by jump to the label
  unpacked.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-06 15:22:19 +00:00