[#43610] Re: [ruby-list:48149] Re: requireが配列を取れたら便利だと思うんだけど.. — Hiroshi Nakamura <nakahiro@...>
cnVieS1saXN0GyRCJCskaTt9JEMkRk1oJF4kNyQ/ISMkRyRiQjMkKyRKJD0kJiEjGyhCCgoyMDEx
松田です。
卜部です
[#43620] Module#mix — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
[#43634] [Ruby 1.9 - Bug #4835][Open] Compilation failure of ext/tk with recent ActiveTcl — Yuki Sonoda <yugui@...>
[#43643] DateTime.new! and DateTime.jd — Aaron Patterson <aaron.patterson@...>
こんにちは、アーロンです。
blocker はお前だろ。
まつもと ゆきひろです
> うーん、ただでさえ日英のコミュニケーション障壁があるのに、よ
2011/6/7 Tadayoshi Funaba <tadf@dotrb.org>:
皆さんってのに俺は入ってないみたいだな。
まつもと ゆきひろです
> Aaronが言ってる「リリース」は1.9.3のことだと思いますよ。
まつもと ゆきひろです
> Railsのリリースについては私は知りません。が、1.9.3のリリース
[#43645] Re: [ruby-core:36778] Re: 1.8.7 release next month — Urabe Shyouhei <shyouhei@...>
Moving to ruby-dev to understand strategies of backporting the Tk
永井@知能.九工大です.
卜部です。
永井@知能.九工大です.
[#43655] [Ruby 1.9 - Bug #4853][Assigned] ext/tk/extconf.rb fails on Mac OS X — Nobuyoshi Nakada <nobu@...>
[#43686] test.rb for make run — SASADA Koichi <ko1@...>
ささだです.
[#43700] [Ruby 1.9 - Bug #4866][Assigned] Macでmake checkするとIO.copy_streamでSEGV — Motohiro KOSAKI <kosaki.motohiro@...>
[#43710] Re: [ruby-changes:19939] kosaki:r31986 (trunk): * ext/tk/tcltklib.c (lib_eventloop_core): replace CHECK_INTS with — KOSAKI Motohiro <kosaki.motohiro@...>
永井さん
永井@知能.九工大です.
2011年6月12日0:00 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>:
[#43716] [Ruby 1.9 - Bug #3137] complex.rb changes exceptions of Math — Koichi Sasada <redmine@...>
[#43717] [Ruby 1.9 - Bug #3456] bisarre comma — Koichi Sasada <redmine@...>
まつもと ゆきひろです
メールにじかに反応したまつもとさんは読んでないと思うのでコメント#5を再掲
まつもと ゆきひろです
卜部です。
[#43743] [Ruby 1.9 - Feature #4871][Open] envのコンパクト化 — Kazuki Tsujimoto <kazuki@...>
[#43779] Re: [ruby-cvs:38869] nobu:r31690 (trunk): * gc.c (vm_xcalloc): use calloc provided by platforms. — Yutaka Kanemoto <kinpoco@...>
こんにちは。
金本と申します。
>> AIXでは0 size mallocでNULLが返るのでこまったことになっています。
ささだです.
[#43787] [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Kenta Murata <muraken@...>
まつもと ゆきひろです
もう結論が出てしまったようですが、これは、元々 lib/complex.rb にあった
=E3=82=80=E3=82=89=E3=81=9F=E3=81=A7=E3=81=99=E3=80=82
> complex.rb をロードすると Math が CMath 相当に置き換わりますから、
=E3=82=80=E3=82=89=E3=81=9F=E3=81=A7=E3=81=99=E3=80=82
まつもと ゆきひろです
=E3=82=80=E3=82=89=E3=81=9F=E3=81=A7=E3=81=99=E3=80=82
> これに相当する事をやっているのが complex.rb なので、
遠藤です。
> 定義域を増やすだけにしよう、ということですよね。賛成です。
2011年6月14日22:17 Tadayoshi Funaba <tadf@dotrb.org>:
> 互換性がないという点では同じ話だと思うのですが……。
2011年6月14日23:02 Tadayoshi Funaba <tadf@dotrb.org>:
> いやあ、5 月末の feature freeze 時点では -2 を返していたはずなんですが、
遠藤です。
[#43791] [Ruby 1.9 - Bug #4879][Open] test_new(OpenSSL::TestPKeyRSA) fails on Win32 — Akio Tajima <artonx@...>
[#43820] mysterious hang at busy loop after system() — Tanaka Akira <akr@...>
以下のようなプログラムが手元の環境のひとつでハングします。
[#43829] [Ruby 1.9 - Bug #4891][Open] Vector#normalize — Kenta Murata <muraken@...>
[#43852] [Ruby 1.9 - Bug #4909][Open] trapハンドラは再入されてはいけないのではないか? — Motohiro KOSAKI <kosaki.motohiro@...>
同意します。
[#43859] [Ruby 1.9 - Bug #4911][Open] timer_thread_function() が thead unsafe — Motohiro KOSAKI <kosaki.motohiro@...>
[#43861] Date/DateTimeの仕様について — "NARUSE, Yui" <naruse@...>
ふなばさん
[#43869] [Ruby 1.9 - Bug #4919][Open] OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生する — Tomoyuki Chikanaga <nagachika00@...>
報告ありがとうございます。32bit環境で落ちるとか考えてませんでした。。。
[#43875] [Ruby 1.9 - Feature #4921][Assigned] Remove intern.h — Yui NARUSE <redmine@...>
[#43890] [Ruby 1.9 - Bug #4072] dRubyで作成したサーバプログラムがsleepしていてもexitしてしまう — Tomoyuki Chikanaga <nagachika00@...>
[#43902] [Ruby 1.9 - Bug #4926][Open] --gc-stress付きtest/ruby/enc/test_emoji.rbが失敗する — Kazuki Tsujimoto <kazuki@...>
[#44001] socket related errors on chkbuild — SASADA Koichi <ko1@...>
ささだです.
[ruby-dev:43707] [Ruby 1.9 - Feature #1374] location of already initialized constant
Issue #1374 has been updated by Koichi Sasada.
まつもとさん? 中田さん?
これ,どうなってますでしょう.
----------------------------------------
Feature #1374: location of already initialized constant
http://redmine.ruby-lang.org/issues/1374
Author: Nobuyoshi Nakada
Status: Assigned
Priority: Low
Assignee: Yukihiro Matsumoto
Category: core
Target version: 1.9.x
=begin
なかだです。
初期化済み定数の警告で、定義された場所を表示するのはどうでしょうか。
$ ./ruby -e X=1 -e X=2
-e:2: warning: already initialized constant X at -e:1
Index: class.c
===================================================================
--- class.c (revision 23168)
+++ class.c (working copy)
@@ -26,4 +26,5 @@ class_alloc(VALUE flags, VALUE klass)
RCLASS_IV_TBL(obj) = 0;
RCLASS_M_TBL(obj) = 0;
+ RCLASS_LOC_TBL(obj) = 0;
RCLASS_SUPER(obj) = 0;
RCLASS_IV_INDEX_TBL(obj) = 0;
Index: gc.c
===================================================================
--- gc.c (revision 23168)
+++ gc.c (working copy)
@@ -1552,4 +1552,5 @@ gc_mark_children(rb_objspace_t *objspace
mark_tbl(objspace, RCLASS_M_TBL(obj), lev);
mark_tbl(objspace, RCLASS_IV_TBL(obj), lev);
+ mark_tbl(objspace, RCLASS_LOC_TBL(obj), lev);
ptr = RCLASS_SUPER(obj);
goto again;
Index: variable.c
===================================================================
--- variable.c (revision 23168)
+++ variable.c (working copy)
@@ -1512,4 +1512,12 @@
{
return rb_const_get_0(klass, id, Qtrue, Qfalse);
+}
+
+static void
+remove_loc(VALUE mod, ID id)
+{
+ if (RCLASS_LOC_TBL(mod)) {
+ st_delete(RCLASS_LOC_TBL(mod), &id, 0);
+ }
}
@@ -1545,4 +1553,5 @@ rb_mod_remove_const(VALUE mod, VALUE nam
val = Qnil;
}
+ remove_loc(mod, id);
return val;
}
@@ -1712,11 +1721,28 @@ mod_av_set(VALUE klass, ID id, VALUE val
}
else if (isconst) {
- VALUE value = Qfalse;
+ st_data_t value = Qfalse;
if (st_lookup(RCLASS_IV_TBL(klass), id, &value)) {
- if (value == Qundef)
- autoload_delete(klass, id);
- else
- rb_warn("already initialized %s %s", dest, rb_id2name(id));
+ if ((VALUE)value == Qundef)
+ autoload_delete(klass, id);
+ else {
+ VALUE file = Qnil;
+ long line = 0;
+ if (st_lookup(RCLASS_LOC_TBL(klass), id, &value)) {
+ file = RNODE(value)->nd_lit;
+ line = RNODE(value)->nd_cnt;
+ }
+ if (!RTEST(file)) {
+ rb_warn("already initialized %s %s", dest, rb_id2name(id));
+ }
+ else if (!line) {
+ rb_warn("already initialized %s %s in %s", dest, rb_id2name(id),
+ RSTRING_PTR(file));
+ }
+ else {
+ rb_warn("already initialized %s %s at %s:%ld", dest, rb_id2name(id),
+ RSTRING_PTR(file), line);
+ }
+ }
}
}
@@ -1726,4 +1752,12 @@ mod_av_set(VALUE klass, ID id, VALUE val
}
st_insert(RCLASS_IV_TBL(klass), id, val);
+ if (!NIL_P(ruby_verbose)) {
+ NODE *loc = NEW_LIT(rb_sourcefile_str());
+ loc->nd_cnt = rb_sourceline();
+ if (!RCLASS_LOC_TBL(klass)) {
+ RCLASS_LOC_TBL(klass) = st_init_numtable();
+ }
+ st_insert(RCLASS_LOC_TBL(klass), id, (st_data_t)loc);
+ }
}
@@ -1958,4 +1992,5 @@ rb_mod_remove_cvar(VALUE mod, VALUE name
if (RCLASS_IV_TBL(mod) && st_delete(RCLASS_IV_TBL(mod), &n, &val)) {
+ remove_loc(mod, id);
return (VALUE)val;
}
Index: vm.c
===================================================================
--- vm.c (revision 23168)
+++ vm.c (working copy)
@@ -749,9 +749,17 @@ const char *
rb_sourcefile(void)
{
+ VALUE file = rb_sourcefile_str();
+ if (file) return RSTRING_PTR(file);
+ return 0;
+}
+
+VALUE
+rb_sourcefile_str(void)
+{
rb_thread_t *th = GET_THREAD();
rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(th, th->cfp);
if (cfp) {
- return RSTRING_PTR(cfp->iseq->filename);
+ return cfp->iseq->filename;
}
else {
Index: include/ruby/intern.h
===================================================================
--- include/ruby/intern.h (revision 23168)
+++ include/ruby/intern.h (working copy)
@@ -200,4 +200,5 @@ void rb_check_frozen(VALUE);
int rb_sourceline(void);
const char *rb_sourcefile(void);
+VALUE rb_sourcefile_str(void);
#if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h (revision 23168)
+++ include/ruby/ruby.h (working copy)
@@ -581,4 +581,5 @@ typedef struct {
VALUE super;
struct st_table *iv_tbl;
+ struct st_table *loc_tbl;
} rb_classext_t;
@@ -591,4 +592,5 @@ struct RClass {
#define RCLASS_IV_TBL(c) (RCLASS(c)->ptr->iv_tbl)
#define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
+#define RCLASS_LOC_TBL(c) (RCLASS(c)->ptr->loc_tbl)
#define RCLASS_SUPER(c) (RCLASS(c)->ptr->super)
#define RCLASS_IV_INDEX_TBL(c) (RCLASS(c)->iv_index_tbl)
--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
中田 伸悦
=end
--
http://redmine.ruby-lang.org