marcandre
9c197735be
* eval.c (method_inspect, method_name, mnew): Bug fix when
...
method created from an alias.
Based on a patch by Peter Vanbroekhoven [ruby-core:22040]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-08 16:55:30 +00:00
nobu
3241664bc3
* eval.c (call_trace_func): remove the trace hook if any exception
...
raised. [ruby-list:46515]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-06 02:01:36 +00:00
nobu
d10ef54c60
* eval.c (get_event_name): added thread events.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-06 01:56:23 +00:00
nobu
3f0d0b9398
* *.[chy]: removed trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-22 01:00:18 +00:00
nobu
d2c1ab806d
* eval.c (rb_clear_cache_for_undef): clear entries for inherited
...
methods. [ruby-core:26074]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-16 00:52:02 +00:00
usa
af3460ef8c
* eval.c (rb_origenviron): remove unused old variable.
...
[ruby-dev:39412]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-02 04:55:06 +00:00
marcandre
5d3affad07
* eval.c (Kernel#autoload?): doc fix by Jeremy Henty [ruby-core:19983]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-23 17:25:41 +00:00
marcandre
a4c105c337
* eval.c (umethod_bind): Fix bug that disallowed methods from singleton classes to be used for UnboundMethod#bind and Module#define_method, even when that singleton class was of the right kind_of [ruby-core:25632]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-22 20:37:20 +00:00
marcandre
7c63ba4efe
* eval.c (rb_mod_define_method): Doc fix (accepts UnboundMethod too)
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-22 18:56:29 +00:00
nobu
73b865bd41
* eval.c (rb_thread_start_0, rb_thread_start_1): should call start
...
timer after added new thread to thread list. [ruby-core:25613]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-17 05:33:39 +00:00
nobu
ce897307b0
* eval.c (rb_thread_start_timer): start to catch SIGVTALRM together
...
with timer thread. [ruby-core:25606]
* eval.c (rb_thread_atfork): stop timer thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-16 07:51:07 +00:00
shyouhei
1a884e8cd5
Merge branch '19migration/looser_args' into ruby_1_8
...
Conflicts:
ChangeLog
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-28 16:06:58 +00:00
akr
a11988cd63
* eval.c (rb_thread_schedule): need select for WAIT_SELECT, even if
...
already timeout. [ruby-dev:38971]
(WAIT_DONE): defined for mark threads which can be runnable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-07 14:40:36 +00:00
akr
7d3391c1fb
* eval.c (rb_thread_schedule): refine previous change.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-06 00:07:13 +00:00
akr
eb2ce3dfa5
* eval.c (rb_thread_schedule): fix condition for making thread
...
runnable. [ruby-core:23515]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-05 16:31:08 +00:00
nobu
699d9a15c4
* eval.c (rb_exc_raise, rb_exc_fatal): require exception object.
...
[ruby-core:24767]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-05 03:54:08 +00:00
nobu
4f5267ce12
* eval.c (rb_eval): does not restore old errinfo when fatal error.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-05 03:46:54 +00:00
nobu
c41d275f6b
* eval.c (rb_eval): not discard fatal error.
...
* eval.c (rb_longjmp): reset raised flag before fatal error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-05 03:36:46 +00:00
nobu
56057f9f8f
* eval.c (rb_event_all, rb_add_event_hook): merged thread-switch
...
events for RubyCocoa. [ruby-dev:38924]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-28 06:48:20 +00:00
nobu
1031c20714
* configure.in (DEPRECATED): backported from trunk.
...
* eval.c (rb_mod_autoload): should use SafeStringValue() instead
obsolete Check_SafeStr().
* ruby.h (rb_check_safe_str, rb_str2cstr): deprecation warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-19 05:03:30 +00:00
nobu
b8d684d9e2
* eval.c (PUSH_ANCHOR, POP_ANCHOR, rb_thread_start_0): separated
...
anchors from PROT_THREAD. [ruby-core:24097]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01 06:49:17 +00:00
nobu
072ccff04d
* eval.c (rb_thread_join), ext/thread/thread.c (wake_one): adjusts
...
targets of rest waiting threads to join. [ruby-core:23457]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-15 08:33:52 +00:00
nobu
87d469b150
* eval.c, gc.c (_longjmp): never return. see [ruby-core:23241]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-01 04:12:40 +00:00
nobu
61c5c2e623
* eval.c (get_ts): use readtime clock. [ruby-dev:38354]
...
* eval.c (rb_thread_stop_timer): clear thread_init while locking.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-28 14:05:07 +00:00
nobu
c35cb918f6
* eval.c (rb_thread_start_timer): guard condition was inverted.
...
[ruby-dev:38319]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-24 05:55:16 +00:00
nobu
d09363d8c9
* eval.c (proc_invoke): shares dmethod scope local variables.
...
a patch from coderrr at [ruby-core:23050]
* gc.c (obj_free): do not free cloned scope local variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-22 03:20:14 +00:00
nobu
0d6f4f3668
* eval.c (ruby_cleanup): the order of local variables on stack is
...
undefined. should use outermost VALUE for ruby_init_stack.
* gc.c (rb_stack_growup_p): returns stack grows up.
* gc.c (Init_stack, ruby_init_stack): allows volatile pointer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-19 05:31:58 +00:00
nobu
7a45568809
* eval.c (safe_mutex_lock): pthread_cleanup_push() must not be
...
inside parens.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-18 10:44:55 +00:00
nobu
9e59bd2d0f
* eval.c (rb_thread_remove): stops timer thread unless other
...
threads exist. [ruby-core:18444]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-18 09:25:55 +00:00
nobu
3175b6e7bb
* gc.c (Init_stack): use ruby_init_stack. [ruby-dev:34350]
...
* intern.h (Init_stack): make to call ruby_init_stack.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-03 09:38:01 +00:00
nobu
92d6ce2e8d
------------------------------------------------------------------------
...
r15996 | nobu | 2008-04-14 12:52:27 +0900 (Mon, 14 Apr 2008) | 2 lines
* gc.c (Init_stack): use ruby_init_stack. [ruby-dev:34350]
------------------------------------------------------------------------
------------------------------------------------------------------------
r17036 | nobu | 2008-06-09 09:54:23 +0900 (Mon, 09 Jun 2008) | 2 lines
* include/ruby/intern.h (Init_stack): make to call ruby_init_stack.
------------------------------------------------------------------------
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-03 04:52:48 +00:00
nobu
a1b9ce96e9
* eval.c (rb_eval): checks for interrupt, stack and finalizers too.
...
[ruby-dev:38208], [Bug #1329 ]
* eval.c (eval): replaces the message if frozen.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-30 03:12:08 +00:00
nobu
19d95e8982
* eval.c (proc_arity): fixed rdoc. [ruby-core:18708]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-16 06:33:04 +00:00
nobu
3b0bc50873
* eval.c (rb_thread_schedule): suppressed a warning.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-16 06:31:37 +00:00
nobu
7e41cbbb49
* eval.c (stack_extend): suppressed a warning.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-16 06:30:54 +00:00
matz
694d70cace
* eval.c (rb_call0): should pass rest argument information even
...
when it's empty. [ruby-dev:38117]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13 16:14:40 +00:00
knu
5f7992aa35
* class.c (rb_singleton_class_clone): Qnil must be used for a null
...
class reference when we use NIL_P() to check class reference
validity. The bug was exposed by the spec test of Sequel.
* eval.c (ruby_init): Use NEW_CREF().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-28 18:12:15 +00:00
nobu
1bcfe8bb74
* eval.c (rb_eval): needs to guard intermediate string objects.
...
based on a patch from Brent Roman <brent AT mbari.org> at
[ruby-core:22584].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-28 09:05:59 +00:00
usa
5a31cfc885
* eval.c (rb_thread_schedule): mswin32 doesn't have F_GETFD, so check
...
with another method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25 13:54:02 +00:00
akr
e509fb2c48
* eval.c (rb_thread_schedule): handle EBADF of select as well.
...
[ruby-core:21264]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14 09:58:46 +00:00
knu
c23f894d30
* proc.c (Init_Proc): add '===' operator to use procs in when
...
clause of the case statement. inspired by <http://www.aimred.com/news/developers/2008/08/14/unlocking_the_power_of_case_equality_proc/ >.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@21898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-30 06:45:32 +00:00
nobu
e02ba9dc4a
* eval.c (Init_Cont): separated from Init_Thread() since
...
rb_provide() must be after Init_Array().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@21782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-26 09:03:53 +00:00
nobu
2af5d793a8
* eval.c (Init_Thread): provides "continuation.so" for forward
...
compatibility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@21778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-26 05:15:03 +00:00
nobu
fd73d45833
* eval.c (rb_thread_start_0): must use ruby_longjmp instead of
...
longjmp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@21444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 04:40:48 +00:00
nobu
f1ef169861
* eval.c (TAG_THREAD): to start a new thread.
...
* eval.c (ruby_init, ruby_options, ruby_cleanup, rb_protect,
rb_load_protect, rb_thread_start_0): make thread anchor.
* eval.c (proc_alloc): clone proc object if klass is not Proc or
created in different thread.
* eval.c (rb_block_pass): call a function with a block. [new]
* eval.c (rb_thread_start_0): restore prot_tag before rewinding.
* eval.c (rb_thread_start_0): update curr_thread before raising
TAG_THREAD. [ruby-dev:25712]
* eval.c (rb_thread_start_1): outer block variables wasn't linked to
threads. fixed: [ruby-dev:25700]
* eval.c (rb_thread_start_1): initialize newly pushed frame.
fixed: [ruby-dev:25707]
* node.h (struct rb_thread): added anchor. backported r7954,
r7964, r7980, r7992, r8014 from trunk.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@21407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-09 06:20:20 +00:00
nobu
65153acec1
* eval.c (stack_extend): streamlined rb_thread_restore_context()
...
to ensure O(1) time. based on a patch by Brent Roman <brent AT
mbari.org>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@21354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-06 09:34:55 +00:00
nobu
1a22daa462
* eval.c (cc_mark): frees the continuation's stack if its thread
...
is dead to avoid recursive gc that segfaults. [ruby-core:13889]
a patch by Brent Roman <brent AT mbari.org>.
* eval.c (rb_cont_check): checks for valid continuation instance.
* eval.c (rb_callcc): assigns th->thread before scope_dup() to
avoid segfaults if this scope_dup() triggers a gc pass.
a patch by Brent Roman <brent AT mbari.org>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@21353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-06 04:39:20 +00:00
akr
bfabd0a798
* eval.c (rb_thread_schedule): Don't change status of threads which
...
don't run next even if select notify readability/writability.
[ruby-core:20446]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@21165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 08:05:52 +00:00
nobu
fb34f6652a
* eval.c (rb_yield_0): Qundef means no argument. [ruby-Bugs-22525]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-08 04:51:43 +00:00
nobu
e624b63367
* eval.c (yield_under): fixed initialization not being allowed in C90.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-16 01:02:41 +00:00