From: Tanaka Akira Date: 2001-07-05T12:49:19+09:00 Subject: [ruby-list:30469] Re: syntax check without execution? In article , Tanaka Akira writes: > def valid? $B$&$%!"$^$A$,$$!#(B def valid?(code) begin eval("BEGIN {return true}; #{code}") rescue SyntaxError return false end return false end $B$G$9!#(B -- [$BEDCf(B $BE/(B][$B$?$J$+(B $B$"$-$i(B][Tanaka Akira] $B!V$U$($m(B! $B$o$+$a$A$c$s:n@o$G$9$(C"=$B!W(B(Little Worker, $B7KM7@84](B)