On FreeBSD people must specify --with-opt-dir or --with-execinfo-dir.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
dfp (dynamic frame pointer) to ep (environment pointer).
This change make VM `normal' (similar to other interpreters).
Before this commit:
Each frame has two env pointers lfp and dfp. lfp points
local environment which is method/class/toplevel frame.
lfp[0] is block pointer.
dfp is block local frame. dfp[0] points previous (parent)
environment pointer.
lfp == dfp when frame is method/class/toplevel.
You can get lfp from dfp by traversing previous environment
pointers.
After this commit:
Each frame has only `ep' to point respective enviornoment.
If there is parent environment, then ep[0] points parent
envioenment (as dfp). If there are no more environment,
then ep[0] points block pointer (as lfp). We call such ep
as `LEP' (local EP). We add some macros to get LEP and to
detect LEP or not.
In short, we replace dfp and lfp with ep and LEP.
rb_block_t and rb_binding_t member `lfp' and `dfp' are removed
and member `ep' is added.
rename rb_thread_t's member `local_lfp' and `local_svar' to
`root_lep' and `root_svar'.
(VM_EP_PREV_EP(ep)): get previous environment pointer. This macro
assume that ep is not LEP.
(VM_EP_BLOCK_PTR(ep)): get block pointer. This macro assume
that ep is LEP.
(VM_EP_LEP_P(ep)): detect ep is LEP or not.
(VM_ENVVAL_BLOCK_PTR(ptr)): make block pointer.
(VM_ENVVAL_BLOCK_PTR_P(v)): detect v is block pointer.
(VM_ENVVAL_PREV_EP_PTR(ptr)): make prev environment pointer.
(VM_ENVVAL_PREV_EP_PTR_P(v)): detect v is prev env pointer.
* vm.c: apply above changes.
(VM_EP_LEP(ep)): get LEP.
(VM_CF_LEP(cfp)): get LEP of cfp->ep.
(VM_CF_PREV_EP(cfp)): utility function VM_EP_PREV_EP(cfp->ep).
(VM_CF_BLOCK_PTR(cfp)): utility function VM_EP_BLOCK_PTR(cfp->ep).
* vm.c, vm_eval.c, vm_insnhelper.c, vm_insnhelper.h, insns.def:
apply above changes.
* cont.c: ditto.
* eval.c, eval_intern.h: ditto.
* proc.c: ditto.
* thread.c: ditto.
* vm_dump.c: ditto.
* vm_exec.h: fix function name (on vm debug mode).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
aggregate type is a C99ism.
* compile.c (enum compile_array_type_t): comma at the end of enum
list is a C99ism.
* vm_backtrace.c (enum LOCATION_TYPE): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c (timer_thread_sleep): Extracted out a function from
thread_timer(). Added an alternative implementation for platforms
that lacks select(2) or pipe(2).
(rb_thread_create_timer_thread, native_cond_initialize,
native_cond_destroy): Replaced wrong HAVE_XXX checks.
* configure.in (pthread_attr_init): New check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
pointer.
* lib/net/http/responses.rb: Add RFC numbers to base on.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to NativeClient SDK. PATH variable redefinition in GNUmakefile does
not work for GNU make 3.81.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c (get_stack): seems stack size does not include
guard size on Mac OS X.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c (ruby_init_stack): adjust stack size for offset of
addr from the bottom.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Mac OS X. cf. the comment in before_exec_non_async_signal_safe.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_exec_async_signal_safe instead of rb_exec_err.
(pipe_open): use rb_fork_async_signal_safe instead of rb_fork_err.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
session id. MD5, as was used before, causes problems when
using a FIPS version of OpenSSL. Issue was found by Jared
Jennings, thank you!
[ruby-trunk - Bug #6137]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/pty/extconf.rb: modify $INCFLAGS to include internal.h
* ext/pty/pty.c: include internal.h.
(chfunc): don't call rb_thread_atfork_before_exec. use
rb_exec_async_signal_safe instead of rb_f_exec.
(establishShell): set up earg. use rb_fork_async_signal_safe
instead of rb_fork_err.
* internal.h (rb_exec_async_signal_safe): declared.
(rb_fork_async_signal_safe): declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ext/openssl/ossl_pkey_rsa.c
ext/openssl/ossl_pkey_dsa.c
ext/openssl/ossl_pkey_ec.c: Forbid export passwords that are less
than four characters long, as OpenSSL itself does not allow this.
Issue found by Eric Hodel.
* ext/openssl/ossl_pkey_ec.c: Add export as an alias of to_pem,
following the PKey interface contract.
* test/openssl/test_pkey_dsa.rb
test/openssl/test_pkey_rsa.rb
test/openssl/test_pkey_ec.rb: Add tests that assert correct
behaviour when dealing with passwords that are less than four
characters long.
[ruby-core: 42281][ruby-trunk - Bug #5951]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
remove SSLContext#disable_client_renegotiation and related
functionality introduced in r35797. The new callback approach
gives clients maximum flexibility to decide on their own what to
do on renegotiation attempts.
Add documentation for SSL module and SSLError.
* test/openssl/test_ssl.rb: Add a test for
SSLContext#renegotiation_cb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
process before exec, for invoking a command.
(rb_exec_atfork): call rb_exec_async_signal_safe only.
(retry_fork): take chfunc_is_async_signal_safe argument. call
before_fork and after_fork only unless chfunc_is_async_signal_safe.
(send_child_error): take chfunc_is_async_signal_safe argument.
send an exception only unless chfunc_is_async_signal_safe.
(recv_child_error): take chfunc_is_async_signal_safe argument.
receive an exception only unless chfunc_is_async_signal_safe.
(rb_fork_internal): renamed from rb_fork_err and take
chfunc_is_async_signal_safe argument.
use rb_protect only unless chfunc_is_async_signal_safe.
(rb_fork_err): call rb_fork_internal with false as
chfunc_is_async_signal_safe.
(rb_fork_async_signal_safe): call rb_fork_internal with true as
chfunc_is_async_signal_safe.
(rb_spawn_process): call rb_fork_async_signal_safe instead of
rb_fork_err.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_symname_p): new function that checks if the string
is valid as a symbol name. split from sym_inspect().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c (iseq_load): type is a symbol, and invalid as ID in common.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
enabled by default.
(rb_f_exec): don't need to set the option.
(rb_exec_arg_prepare): don't need to set the option. don't need
default_close_others argument.
(rb_spawn_internal): don't need to give default_close_others
argument for rb_exec_arg_prepare. don't need default_close_others
argument.
(rb_spawn_err): don't need to give default_close_others
argument for rb_spawn_internal.
(rb_spawn): don't need to give default_close_others
argument for rb_spawn_internal.
(rb_f_system): don't need to give default_close_others argument for
rb_spawn_internal.
(rb_f_spawn): don't need to give default_close_others argument for
rb_exec_arg_prepare.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c (ruby_init_stack): use stack info if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
documentation of extconf.rb functions. Patch by Zachary Scott.
[ruby-trunk - Feature #6522]
* README.EXT (Appendix C): Removed in favor of MakeMakefile.
Patch by Zachary Scott.
* lib/mkmf.rb: Merged documentation from README.EXT Appendix C. Patch
by Zachary Scott.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to match other String method examples. [ruby-trunk - Bug #6553]
* string.c (rb_str_end_with): Updated end_with? to use code markup
instead of italic.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e