aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r31873 Module#mixnobu2012-06-255-253/+6
| | | | | | * class.c (rb_mix_module): revert Module#mix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* method transplantingnobu2012-06-251-0/+4
| | | | | | | * proc.c (rb_mod_define_method): allow method transplanting from a module to either class or module. [ruby-core:34267][Feature #4254] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* method transplantingnobu2012-06-253-5/+13
| | | | | | | * proc.c (rb_mod_define_method): allow method transplanting from a module to either class or module. [ruby-core:34267][Feature #4254] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* popen: shell commands with envvarnobu2012-06-253-38/+63
| | | | | | | | | * io.c (is_popen_fork): check if fork and raise NotImplementedError if unavailable. * io.c (rb_io_s_popen): allow shell commands with modified environment variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: use rb_pid_t instead of pid_t because of there is nousa2012-06-252-1/+6
| | | | | | | definition of pid_t here on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-06-25svn2012-06-241-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (for stack end address): remove human68k specifickosaki2012-06-242-5/+9
| | | | | | check. It is no longer supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: spawnvnobu2012-06-242-95/+66
| | | | | | * io.c (pipe_open): merge win32 code using spawnv(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: separate check_exec_fds_1nobu2012-06-242-17/+24
| | | | | | | * process.c (check_exec_fds): separate check_exec_fds_1() since nonstatic initializer of an aggregate type is not allowed by C89. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* trailing spacesnobu2012-06-241-5/+5
| | | | | | * ChangeLog: remove trailing spaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update async-signal-safe comments.akr2012-06-241-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-06-24svn2012-06-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (rb_execarg): options field removed.akr2012-06-233-10/+6
| | | | | | | | * process.c: follow the rb_execarg change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (proc_spawn_cmd): unused variable removed to suppress aakr2012-06-232-3/+10
| | | | | | | | | | | warning. (save_env): ditto. [ruby-core:45797] reported by Luis Lavena. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (rb_execarg): add new_pgroup_given and new_pgroup_flagakr2012-06-233-10/+20
| | | | | | | | | | | | | | fields. * process.c (EXEC_OPTION_NEW_PGROUP): removed. (proc_spawn_cmd): take a struct rb_execarg argument. use the new fields. (rb_execarg_addopt): use the new fields. (rb_spawn_process): follow the proc_spawn_cmd change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (rb_execarg): add fd_dup2, fd_close, fd_open,akr2012-06-233-52/+73
| | | | | | | | | | | | | | | | | | | | fd_dup2_child fields. * process.c (EXEC_OPTION_DUP2): removed. (EXEC_OPTION_CLOSE): removed. (EXEC_OPTION_OPEN): removed. (EXEC_OPTION_DUP2_CHILD): removed. (mark_exec_arg): mark the new fields. (check_exec_redirect1): change condition for default option. (check_exec_redirect): take a struct rb_execarg argument. use the new fields. (rb_execarg_addopt): follow the check_exec_redirect change. (check_exec_fds): use the new fields. (save_redirect_fd): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_execarg_fixup): fix envopts condition.akr2012-06-232-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (check_exec_redirect1): extracted fromakr2012-06-232-17/+29
| | | | | | | | check_exec_redirect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (save_env): don't use EXEC_OPTION_UNSETENV_OTHERS.akr2012-06-232-3/+8
| | | | | | | | (rb_execarg_run_options): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (rb_execarg): add env_modification field.akr2012-06-233-8/+20
| | | | | | | | | | | | | * process.c (EXEC_OPTION_ENV): removed. (mark_exec_arg): mark env_modification field. (rb_exec_fillarg): update the new field, instead of options array. (rb_execarg_fixup): use the new field. (save_env): ditto. (rb_execarg_run_options): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (rb_execarg): add rlimit_limits field.akr2012-06-233-15/+25
| | | | | | | | | | | | | * process.c (EXEC_OPTION_RLIMIT): removed. (mark_exec_arg): mark rlimit_limits field. (rb_execarg_addopt): update the new fields, instead of options array. (run_exec_rlimit): use the new field. (rb_execarg_run_options): clear sarg using MEMZERO. use the new field. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (rb_execarg): add chdir_given and chdir_dir fields.akr2012-06-233-9/+19
| | | | | | | | | | | * process.c (EXEC_OPTION_CHDIR): removed. (mark_exec_arg): mark chdir_dir field. (rb_execarg_addopt): update the new fields, instead of options array. (rb_execarg_run_options): use the new fields. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (rb_execarg): add close_others_given, close_others_do andakr2012-06-233-12/+24
| | | | | | | | | | | | | | | close_others_maxhint fields. * process.c (EXEC_OPTION_CLOSE_OTHERS): removed. (rb_execarg_addopt): update the new fields, instead of options array. (check_exec_fds): take eargp as an argument. update the close_others_maxhint field. (rb_execarg_fixup): follow the argument change of check_exec_fds. (rb_execarg_run_options): use the new fields. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (rb_execarg): add unsetenv_others_given andakr2012-06-233-8/+19
| | | | | | | | | | | | unsetenv_others_do fields. * process.c (EXEC_OPTION_UNSETENV_OTHERS): removed. (rb_execarg_addopt): update the new fields, instead of options array. (rb_execarg_fixup): use the new fields. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c: use the variable name "soptions" for sargp->options.akr2012-06-232-13/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c: use the name "sargp" for struct rb_execarg variablesakr2012-06-233-48/+55
| | | | | | | | | | consistently for saving process attributes. * io.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert some teststadf2012-06-222-4/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c: use the name "eargp" for struct rb_execarg variablesakr2012-06-224-108/+117
| | | | | | | | | | | | consistently except for saving process attributes. * io.c: ditto. * ext/pty/pty.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: fix a typonagachika2012-06-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-06-23svn2012-06-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .gdbinit: improve rp for classnobu2012-06-221-0/+6
| | | | | | | * .gdbinit (rp): improve for class/iclass/module so print content of RClass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [Bug #6540]nobu2012-06-221-0/+8
| | | | | | | * test/ruby/test_rand.rb (TestRand#test_initialize_frozen): add missing test for [Bug #6540] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/test/unit.rb: show file count in parallel modenobu2012-06-221-2/+9
| | | | | | | | * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): show file count in parallel mode. since worker processes run tests per files, the parent process cannot tell how many tests will be run in advance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/test/unit.rb: initialize ivarnobu2012-06-221-0/+1
| | | | | | | * lib/test/unit.rb (Test::Unit::Runner#del_status_line): initialize @status_line_size if needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk: Add missing dependencies.yugui2012-06-222-8/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h (rb_execarg): add pgroup_given and pgroup_pgid fields.akr2012-06-223-15/+31
| | | | | | | | | | | | * process.c (EXEC_OPTION_PGROUP): removed. (rb_execarg_addopt): update the new fields, instead of options array. (run_exec_pgroup): take a struct rb_execarg argument. refer the new fields. (rb_execarg_run_options): follow run_exec_pgroup change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * README.EXT, README.EXT.ja: use "sval" for the third argumentkou2012-06-223-2/+8
| | | | | | | | name of Data_Wrap_Struct(). Suggested by @satoh_fumiyasu. Thanks!!! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c, vm_eval.c: set th->base_block properly.ko12012-06-229-37/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | th->base_block is information for (a) parsing, (b) compiling and (c) setting up the frame to execute the program passed by `eval' method. For example, (1) parser need to know up-level variables to detect it is variable or method without paren. Befor (a), (b) and (c), VM set th->base_block by passed bindng (or previous frame information). After execute (a), (b) and (c), VM should clear th->base_block. However, if (a), (b) or (c) raises an exception, then th->base_block is not cleared. Problem is that the uncleared value th->balo_block is used for irrelevant iseq compilation. It causes SEGV or critical error. I tried to solve this problem: to clear them before exception, but finally I found out that it is difficult to do it (Ruby program can be run in many places). Because of this background, I set th->base_block before compiling iseq and restore it after compiling. Basically, th->base_block is dirty hack (similar to global variable) and this patch is also dirty. * bootstraptest/test_eval.rb: add a test for above. * internal.h: remove unused decl. * iseq.c (rb_iseq_compile_with_option): add base_block parameter. set th->base_block before compation and restore it after compilation. * ruby.c (require_libraries): pass 0 as base_block instead of setting th->base_block * tool/compile_prelude.rb (prelude_eval): apply above changes. * vm.c, vm_eval.c: ditto. * vm_core.h: add comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c: pass struct rb_execarg value instead of its optionsakr2012-06-222-27/+47
| | | | | | | | | | | | | | | | | field for saving process attribute changing functions. (save_redirect_fd): take a struct rb_execarg argument. (run_exec_dup2): ditto. (run_exec_close): ditto. (run_exec_open): ditto. (run_exec_dup2_child): ditto. (run_exec_pgroup): ditto. (run_exec_rlimit): ditto. (save_env): ditto. (rb_execarg_run_options): follow the above functions change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_backtrace.rb: decrease recursion depthko12012-06-222-1/+6
| | | | | | | | to reduce consuming stack size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* marshal.c: io_needednobu2012-06-221-5/+11
| | | | | | * marshal.c (io_needed): extract from marshal_dump and marshal_load. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c: check initialize and loadnobu2012-06-223-0/+29
| | | | | | | * random.c (random_init, random_load): cannot initialize frozen object again, nor with tainted/untrusted object. [Bug #6540] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c: rb_check_copyablenobu2012-06-223-0/+21
| | | | | | | * error.c (rb_check_copyable): new function, to ensure the target is not frozen and the source is not tainted nor untrusted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: constant expressionnobu2012-06-221-4/+2
| | | | | | | * process.c (rb_exec_async_signal_safe): use a constant expression instead of a macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c: fix indentnobu2012-06-221-4/+4
| | | | | | * variable.c (rb_ivar_count, rb_autoloading_value): fix indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-06-22svn2012-06-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ruby_cleanup): Fixed typo. Patch by Trever Dawe.drbrain2012-06-212-1/+6
| | | | | | | Fixes #131 (github). [ruby-trunk - Bug #6619] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* needless RB_GC_GUARD removed.akr2012-06-211-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove garbage line.akr2012-06-211-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_execarg_addopt): take a VALUE argument instead ofakr2012-06-214-16/+26
| | | | | | | | | | | | | | struct rb_execarg. (rb_exec_arg_addopt): follow the rb_execarg_addopt change. (check_exec_options_i): ditto. * io.c (pipe_open): follow the rb_execarg_addopt change. * internal.h (rb_execarg_addopt): follow the definition change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e