--------_403F8CB84A8603911C98_MULTIPART_MIXED_
Content-Type: text/plain; charset="ISO-2022-JP"
Content-Transfer-Encoding: 7bit

西山です。

ERBでfilenameとsafe_levelを同時に指定したときにfilenameが
反映されません。

diff -u -p -u -r1.11 erb.rb
--- erb.rb	10 Dec 2003 09:07:52 -0000	1.11
+++ erb.rb	27 Feb 2004 18:29:37 -0000
@@ -414,7 +414,7 @@ class ERB
     if @safe_level
       th  hread.start { 
 	$SAFE  safe_level
-	eval(@src, b)
+	eval(@src, b, (@filename || '(erb)'), 1)
       }
       return th.value
     else


-- 
|ZnZ(ゼット エヌ ゼット)
|西山和広(Kazuhiro NISHIYAMA)

--------_403F8CB84A8603911C98_MULTIPART_MIXED_
Content-Type: application/octet-stream; name="test_erb.rb"
Content-Disposition: attachment;
 filenameest_erb.rb"
Content-Transfer-Encoding: base64

cmVxdWlyZSAndGVzdC91bml0JwpyZXF1aXJlICdlcmInCgpjbGFzcyBUZXN0RVJCIDwgVGVzdDo6
VW5pdDo6VGVzdENhc2UKICBjbGFzcyBNeUVycm9yIDwgUnVudGltZUVycm9yIDsgZW5kCgogIGRl
ZiB0ZXN0X3dpdGhvdXRfZmlsZW5hbWUKICAgIGVyYiA9IEVSQi5uZXcoIjwlIHJhaXNlIDo6VGVz
dEVSQjo6TXlFcnJvciAlPiIpCiAgICBlID0gYXNzZXJ0X3JhaXNlKE15RXJyb3IpIHsKICAgICAg
ZXJiLnJlc3VsdAogICAgfQogICAgYXNzZXJ0X2VxdWFsKCIoZXJiKToxIiwgZS5iYWNrdHJhY2Vb
MF0pCiAgZW5kCgogIGRlZiB0ZXN0X3dpdGhfZmlsZW5hbWUKICAgIGVyYiA9IEVSQi5uZXcoIjwl
IHJhaXNlIDo6VGVzdEVSQjo6TXlFcnJvciAlPiIpCiAgICBlcmIuZmlsZW5hbWUgPSAidGVzdCBm
aWxlbmFtZSIKICAgIGUgPSBhc3NlcnRfcmFpc2UoTXlFcnJvcikgewogICAgICBlcmIucmVzdWx0
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