From: "NAKAMURA, Hiroshi" Date: 2001-02-21T11:32:01+09:00 Subject: [ruby-talk:11208] Re: ANN: RubyCHannel -> Rwiki w. Online Ruby Interpreter Hi, I wish I could help you... > From: Clemens Wyss > Sent: Wednesday, February 21, 2001 4:10 AM > RubyCHannel (http://www.ruby.ch) now has yet another demo/test-"service". > An rwiki which allows embedding ruby interpreted code > (http://www.ruby.ch/cgi-bin/rw.cgi). Whatever text is enclosed in > ...-tags will be put into a (cgi-)form which then > can be executed making use of the online ruby interpreter. Very interesting. How does the server interprete rbi_code tag? Does this patch engage your interest? Though I have not run the code... // NaHi Index: rd2rwiki-lib.rb =================================================================== RCS file: /src/app/rwiki/rd2rwiki-lib.rb,v retrieving revision 1.26 diff -u -2 -p -r1.26 rd2rwiki-lib.rb --- rd2rwiki-lib.rb 2001/02/03 22:29:24 1.26 +++ rd2rwiki-lib.rb 2001/02/21 02:17:10 @@ -80,5 +80,13 @@ module RD content.push(apply_to_String(i)) end - %Q[
\n#{content.join("")}
\n] + content_str = content.join("") + unless content_str.sub!( /^rbi_code/, '' ) + %Q[
\n#{content_str}
\n] + else + # Puts form + %Q[
......
\n] + # Or eval immediately? + # %Q[<%= eval_InCustomizedSAFESAFESAFESandBox(#{content_str.dump}) %>\n] + end end