[#38725] [Bug #1720] [NaN] == [NaN] が true になる — tadayoshi funaba <redmine@...>
Bug #1720: [NaN] == [NaN] が true になる
[#38731] FreeBSD で ruby-mecab のライブラリ参照の不具合 — "KISHIMOTO, Makoto" <ksmakoto@...4u.or.jp>
きしもとです
[#38762] Re: [ruby-cvs:31110] Ruby:r23892 (trunk): * rational.c (float_to_r): always returns rational. — "Yugui (Yuki Sonoda)" <yugui@...>
On 6/29/09 8:31 PM, tadf@ruby-lang.org wrote:
[#38782] [Bug:trunk] Re: [ruby-cvs:31281] Ruby:r24063 (trunk): * ext/tk/extconf.rb: New strategy for searching Tcl/Tk libraries. — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
永井@知能.九工大です.
こんにちは、なかむら(う)です。
永井@知能.九工大です.
こんにちは、なかむら(う)です。
永井@知能.九工大です.
こんにちは、なかむら(う)です。
永井@知能.九工大です.
永井@知能.九工大です.
こんにちは、なかむら(う)です。
押田です。
[#38821] セキュリティモデルのドキュメント — Shugo Maeda <shugo@...>
前田です。
[#38836] ext/tk/extconf.rb creates a file in $srcdir — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
[#38843] 複素数リテラルについて — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
> * 互換性はどうか。大丈夫のはずだが、見落としは
遠藤です。
> は十分検討されたのでしょうか。積極的に反対なわけではないですが、
遠藤です。
> 読み書きがやさしいのはわかるんですが、1+2i が書けても 1+ni が書けない
[#38850] Rational#hash — Tadayoshi Funaba <tadf@...>
いつだったか、rational などの hash が変ったようですが、意味が解っていな
[#38900] rb_eval_string_protect and encoding — Masaki Suketa <masaki.suketa@...>
助田です。
なかだです。
助田です。
[#38912] String#valid_encoding?にオプションが欲しい — Fujioka <fuj@...>
xibbarこと藤岡です。(なぜか届かないので再送します)
成瀬です。
xibbarです。
xibbarです。
まつもと ゆきひろです
成瀬です。
まつもと ゆきひろです
[#38924] thread switch hook for RubyCocoa — Nobuyoshi Nakada <nobu@...>
なかだです。
木村わ@RubyCocoaチーム/MacPorts port:rubyメンテナです。
木村わ@RubyCocoaです。
[#38932] Enumerator#peek — Tanaka Akira <akr@...>
Enumerator#peek を新設するのはどうでしょうか。
けいじゅ@いしつかです.
In article <E1MVnmx-00046e-PP@keiju.ishitsuka.com>,
けいじゅ@いしつかです.
In article <E1MW8kB-0001fM-56@keiju.ishitsuka.com>,
[#38938] Re: [ruby-list:46234] Re: irbでの式展開中の動作について — keiju@... (石塚圭樹)
けいじゅ@いしつかです.
[#38971] [Bug #1848] Net::SSH hangs — Shyouhei Urabe <redmine@...>
Bug #1848: Net::SSH hangs
チケット #1848 が更新されました。 (by Shyouhei Urabe)
Shyouhei Urabe さんは書きました:
[ruby-dev:38940] Re: thread switch hook for RubyCocoa
木村(わ)です。
RubyCocoaのほうのパッチですが、#ifと#endifの数が一致しません。
私のかんちがいなのかもしれませんが、確認していただけないでしょうか?
On Tue, 28 Jul 2009 07:36:21 +0900, Nobuyoshi Nakada wrote:
> なかだです。
>
> Mac OS X用のruby 1.8には、RubyCocoa向けにApple独自のthread_hook
> パッチというものが入っています。これは1.8標準のEVENT_HOOKと事実
> 上同じ機能であり、フックのタイミングを追加するだけです。
> RubyKaigiのときにちょっとknuさんや、高尾さん、MacPortsメンテナの
> 木村わさんとも話したんですが、標準に追加してはどうでしょうか。
>
> --- framework/src/objc/RBRuntime.m.orig 2009-02-18 06:46:15.000000000 +0900
> +++ framework/src/objc/RBRuntime.m 2009-07-28 07:27:20.000000000 +0900
> @@ -487,29 +487,13 @@
> static int rb_cocoa_thread_debug = 1;
>
> -#ifndef RUBY_THREADSWITCH_INIT
> -/* The declarations immediately below come from the patched ruby.h.
> - Since they are not available here (determined by the lack of
> definition for
> - RUBY_THREADSWITCH_INIT) we define them manually, so that a patched
> - libruby.dylib can still be used at runtime.
> -*/
> -
> -typedef unsigned int rb_threadswitch_event_t;
> -
> -#define RUBY_THREADSWITCH_INIT 0x01
> -#define RUBY_THREADSWITCH_FREE 0x02
> -#define RUBY_THREADSWITCH_SAVE 0x04
> -#define RUBY_THREADSWITCH_RESTORE 0x08
> -
> -typedef void (*rb_threadswitch_hook_func_t)
> _((rb_threadswitch_event_t,VALUE));
> +#ifdef RUBY_EVENT_THREAD_ALL
> +#define RUBY_EVENT_THREAD_INIT 0x0100
> +#define RUBY_EVENT_THREAD_FREE 0x0200
> +#define RUBY_EVENT_THREAD_SAVE 0x0400
> +#define RUBY_EVENT_THREAD_RESTORE 0x0800
> +#define RUBY_EVENT_THREAD_ALL 0x0f00
> #endif
>
> -/* The following two functions are marked as weak imports so that
> RubyCocoa
> - will still load without thread switching hooks support in the ruby
> - interpreter.
> -*/
> -extern void *rb_add_threadswitch_hook(rb_threadswitch_hook_func_t func)
> - __attribute__ ((weak_import));
> -extern void rb_remove_threadswitch_hook(void *handle)
> - __attribute__ ((weak_import));
> +extern rb_event_t rb_event_all __attribute__ ((weak_import));
>
> /* Cached values for direct call to +[NSThread currentThread] (not
> clear if
> @@ -850,8 +834,8 @@
> This function is registered with the ruby core as a threadswitch
> event hook.
> */
> -static void rb_cocoa_thread_schedule_hook(rb_threadswitch_event_t event,
> - VALUE thread)
> +static void rb_cocoa_thread_schedule_hook(rb_event_t event, NODE
> *node, VALUE thread,
> + ID methodid, VALUE klass)
> {
> - void *context;
> + st_data_t context, key = (st_data_t)thread;
> NSThread *nsthread;
>
> @@ -864,17 +848,16 @@
> }
> switch (event) {
> - case RUBY_THREADSWITCH_INIT:
> - context = rb_cocoa_thread_init_context(nsthread,
> + case RUBY_EVENT_THREAD_INIT:
> + context = (st_data_t)rb_cocoa_thread_init_context(nsthread,
> rb_cocoa_did_install_thread_hooks || thread == rb_thread_main()
> ? thread : Qnil);
> - DLOG("Created context %p for thread %p\n", context, (void*)thread);
> - st_insert(rb_cocoa_thread_state, (st_data_t)thread,
> (st_data_t)context);
> + DLOG("Created context %p for thread %p\n", (void*)context,
> (void*)thread);
> + st_insert(rb_cocoa_thread_state, key, context);
> break;
>
> - case RUBY_THREADSWITCH_FREE:
> - if (st_delete(rb_cocoa_thread_state, (st_data_t*)&thread,
> - (st_data_t *)&context)) {
> + case RUBY_EVENT_THREAD_FREE:
> + if (st_delete(rb_cocoa_thread_state, &key, &context)) {
>
> - DLOG("Freeing context %p for thread %p\n", context, (void*)thread);
> + DLOG("Freeing context %p for thread %p\n", (void*)context,
> (void*)thread);
> rb_cocoa_thread_free_context(nsthread,thread,
> (struct rb_cocoa_thread_context*) context);
> @@ -882,23 +865,21 @@
> break;
>
> - case RUBY_THREADSWITCH_SAVE:
> - if (!st_lookup(rb_cocoa_thread_state, (st_data_t)thread,
> - (st_data_t *)&context)) {
> + case RUBY_EVENT_THREAD_SAVE:
> + if (!st_lookup(rb_cocoa_thread_state, key, &context)) {
>
> - DLOG("Created context before save %p for thread %p\n", context,
> + DLOG("Created context before save %p for thread %p\n",
> (void*)context,
> (void*)thread);
> context = rb_cocoa_thread_init_context(nsthread, thread);
> - st_insert(rb_cocoa_thread_state, (st_data_t)thread,
> (st_data_t)context);
> + st_insert(rb_cocoa_thread_state, key, context);
> }
> - DLOG("Saving context %p for thread %p\n", context, (void*)thread);
> + DLOG("Saving context %p for thread %p\n", (void*)context,
> (void*)thread);
> rb_cocoa_thread_save_context(nsthread,
> (struct rb_cocoa_thread_context*) context);
> break;
>
> - case RUBY_THREADSWITCH_RESTORE:
> - if (st_lookup(rb_cocoa_thread_state, (st_data_t)thread,
> - (st_data_t *)&context)) {
> + case RUBY_EVENT_THREAD_RESTORE:
> + if (st_lookup(rb_cocoa_thread_state, key, &context)) {
>
> - DLOG("Restoring context %p for thread %p\n", context,
> (void*)thread);
> + DLOG("Restoring context %p for thread %p\n", (void*)context,
> (void*)thread);
> rb_cocoa_thread_restore_context(nsthread,
> (struct rb_cocoa_thread_context*) context);
> @@ -919,23 +900,11 @@
> rb_cocoa_thread_debug = getenv("RUBYCOCOA_THREAD_DEBUG") != NULL;
>
> - if (rb_add_threadswitch_hook == NULL) {
> + if (&rb_event_all == NULL || !(rb_event_all & RUBY_EVENT_THREAD_ALL)) {
> if (rb_cocoa_thread_debug) {
> - NSLog(@"RBCocoaInstallRubyThreadSchedulerHooks: warning:
> rb_set_cocoa_thread_hooks not present in ruby core");
> + NSLog(@"RBCocoaInstallRubyThreadSchedulerHooks: warning:
> RUBY_EVENT_THREAD_ALL not present in ruby core");
> }
> return;
> }
>
> - NSSymbol threadswitch_symbol =
> - NSLookupAndBindSymbol("_rb_add_threadswitch_hook");
> - NSSymbol ruby_init_symbol =
> - NSLookupAndBindSymbol("_ruby_init");
> -
> - if (NSModuleForSymbol(threadswitch_symbol)
> - != NSModuleForSymbol(ruby_init_symbol)) {
> - NSLog(@"RBCocoaInstallRubyThreadSchedulerHooks: warning:
> rb_set_cocoa_thread_hooks is linked from a different library (%s)
> than ruby_init (%s)",
> - NSNameOfModule(NSModuleForSymbol(threadswitch_symbol)),
> NSNameOfModule(NSModuleForSymbol(ruby_init_symbol)));
> - return;
> - }
> -
> rb_cocoa_thread_state = st_init_numtable();
> rb_cocoa_main_nsthread = [NSThread currentThread];
> @@ -978,9 +947,10 @@
>
> /* Finally, register the hook with the ruby core */
> - rb_add_threadswitch_hook(rb_cocoa_thread_schedule_hook);
> + rb_add_event_hook(rb_cocoa_thread_schedule_hook, RUBY_EVENT_THREAD_ALL);
> rb_cocoa_did_install_thread_hooks = YES;
>
> DLOG("Thread hooks done, main Ruby thread is %p\n",
> (void *)rb_thread_current());
> +#endif
> }
>
>
>
> --
> --- 僕の前にBugはない。
> --- 僕の後ろにBugはできる。
> 中田 伸悦
>