summaryrefslogtreecommitdiff
path: root/bootstraptest/test_proc.rb
AgeCommit message (Collapse)Author
2017-12-28`$SAFE` as a process global state. [Feature #14250]ko1
* vm_core.h (rb_vm_t): move `rb_execution_context_t::safe_level` to `rb_vm_t::safe_level_` because `$SAFE` is a process (VM) global state. * vm_core.h (rb_proc_t): remove `rb_proc_t::safe_level` because `Proc` objects don't need to keep `$SAFE` at the creation. Also make `is_from_method` and `is_lambda` as 1 bit fields. * cont.c (cont_restore_thread): no need to keep `$SAFE` for Continuation. * eval.c (ruby_cleanup): use `rb_set_safe_level_force()` instead of access `vm->safe_level_` directly. * eval_jump.c: End procs `END{}` doesn't keep `$SAFE`. * proc.c (proc_dup): removed and introduce `rb_proc_dup` in vm.c. * safe.c (rb_set_safe_level): don't check `$SAFE` 1 -> 0 changes. * safe.c (safe_setter): use `rb_set_safe_level()`. * thread.c (rb_thread_safe_level): `Thread#safe_level` returns `$SAFE`. It should be obsolete. * transcode.c (load_transcoder_entry): `rb_safe_level()` only returns 0 or 1 so that this check is not needed. * vm.c (vm_proc_create_from_captured): don't need to keep `$SAFE` for Proc. * vm.c (rb_proc_create): renamed to `proc_create`. * vm.c (rb_proc_dup): moved from proc.c. * vm.c (vm_invoke_proc): do not need to set and restore `$SAFE` for `Proc#call`. * vm_eval.c (rb_eval_cmd): rename a local variable to represent clearer meaning. * lib/drb/drb.rb: restore `$SAFE`. * lib/erb.rb: restore `$SAFE`, too. * test/lib/leakchecker.rb: check `$SAFE == 0` at the end of tests. * test/rubygems/test_gem.rb: do not set `$SAFE = 1`. * bootstraptest/test_proc.rb: catch up this change. * spec/ruby/optional/capi/string_spec.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: ditto. * test/fiddle/test_func.rb: ditto. * test/fiddle/test_handle.rb: ditto. * test/net/imap/test_imap_response_parser.rb: ditto. * test/pathname/test_pathname.rb: ditto. * test/readline/test_readline.rb: ditto. * test/ruby/test_file.rb: ditto. * test/ruby/test_optimization.rb: ditto. * test/ruby/test_proc.rb: ditto. * test/ruby/test_require.rb: ditto. * test/ruby/test_thread.rb: ditto. * test/rubygems/test_gem_specification.rb: ditto. * test/test_tempfile.rb: ditto. * test/test_tmpdir.rb: ditto. * test/win32ole/test_win32ole.rb: ditto. * test/win32ole/test_win32ole_event.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27* vm.c (rb_vm_make_env_object): make Proc object if Env is possibleko1
to point block. [ruby-core:41038] [ruby-trunk - Bug #5634] * vm.c (rb_vm_make_proc): No need to make Proc object here. * bootstraptest/test_proc.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10* vm_insnhelper.c (vm_throw): check a class frame.ko1
Fixes Bug #4648. The patch is contributed by Kazuki Tsujimoto. * bootstraptest/test_proc.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-02* bootstraptest/test_proc.rb: suppress error message.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27* eval.c (get_errinfo): return th->errinfo valueko1
if normal errinfo place (dynamic local viriable) is not found. fixes Bug #732 [ruby-dev:37046]. * bootstraptest/test_proc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* proc.c (proc_new): should use proc_dup() if block has Proc.ko1
* vm.c (vm_make_proc_from_block): should use rb_cProc for block. * vm.c (vm_make_proc): add an assertion. * bootstraptest/test_proc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-19* string.c (str_gsub): should preserve last successful matchmatz
data. [ruby-dev:35182] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-19* proc.c (proc_new): fix to return Proc object if block is alreadyko1
in heap. [ruby-core:15711] * bootstraptest/test_proc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-19* vm_insnhelper.c (vm_throw): fix "return" process from "lambda".ko1
* bootstraptest/test_proc.rb: add a test. * bootstraptest/pending.rb: add a pending bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-17* vm.c, vm_insnhelper.c: fix escape process with "braek" and "return"ko1
syntax in "lambda". [ ruby-Bugs-19304 ], [ruby-core:17164] * KNOWNBUGS.rb, bootstraptest/test_proc.rb: add/move solved test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-10* vm.c, eval_intern.h (PASS_PASSED_BLOCK):ko1
set a VM_FRAME_FLAG_PASSED flag to skip this frame when searching ruby-level-cfp. * eval.c, eval_intern.h, proc.c: fix to check cfp. if there is no valid ruby-level-cfp, cause RuntimeError exception. [ruby-dev:34128] * vm_core.h, vm_evalbody.c, vm.c, vm_dump.c, vm_insnhelper.c, insns.def: rename FRAME_MAGIC_* to VM_FRAME_MAGIC_*. * KNOWNBUGS.rb, bootstraptest/test*.rb: move solved bugs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-12* bootstraptest/test_proc.rb: fixed wrong expected result. pointednobu
out by Kornelius "murphy" Kalnbach <murphy AT rubychan.de> in [ruby-core:15022]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-11* proc.c (proc_mark): needs to mark the receiver too. a patch fromnobu
Chris Heath <chris AT heathens.co.nz> in [ruby-core:14983]. [ruby-core:14885] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-27* bootstraptest/runner.rb: fix to show file name.ko1
* bootstraptest/test_*.rb: add bootstarp tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e