From: TAKAHASHI Masayoshi Date: 2002-10-01T08:00:04+09:00 Subject: ruby-dev summary 18320-18406 Hi all, This is a summary of ruby-dev ML in these days. ---- ruby-dev #18320-18406 (2002-09-21 ... 2002-09-28) ---- [ruby-dev:18354] parser reentrancy Nobu Nakada pointed out that allocation is called in Ruby 1.7 when an instance of pre-defined class is created, so thread switching may happen during parsing. It breaks parser's reentrancy. class << String alias_method(:__allocate__, :allocate) def allocate(*args) s = __allocate__(*args) c = @allocate_hook @allocate_hook = nil c.call if c s end def allocate_hook(&block) @allocate_hook = block end end x = 0 s = "p x" String.allocate_hook do p __FILE__ # eval("x = 1") # delete this comment, then... end eval(s) # raise syntax error. Matz said that allocation would be canceled and other API would be added. [ruby-dev:18361] compile parse.y with -Wall Nobu Nakada (also) pointed out that there were many warnings when he compiled parse.y using gcc with -Wall option. Some warnings were fixed, but Matz wanted to ignore "assignment in condition" warnings because of 'taste'. Akinori MUSHA suggested that double parentheses around assignment supress warnings: if ((a = b(c))) /*...*/; and also suggested that sometimes someone checked these warnings and added parentheses. [ruby-dev:18391] pstore.rb can make a broken store YANAGAWA Kazuhisa pointed out that Pstore can break stored data because pstore has no locking system. He posted a patch, but Tanaka Akira noticed that the patch is not enough. Matz told that pstore.rb is just 'proof of concept' (at least when he wrote it) and he would change its maintainer of pstore if someone will want to improve it. TAKAHASHI 'Maki' Masayoshi E-mail: maki@rubycolor.org