--0016e6d784ee050dca0478b39bf8
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,

2009/11/17 Shugo Maeda <shugo / ruby-lang.org>:
> I guess we have four options now:
>
> (1) As you suggested, revert to the behavior of Ruby 1.8, and add a
>  ¨Βεχ νετθοδ ¨οζμαητο εξαβμε τθξεβεθαφιος
My proposal is as follows:

(1) Revert instance_eval, class_eval, and module_eval back to the
behavior of 1.8.
(2) But do not revert instance_exec, class_exec, and module_exec.

I have attached a patch.
My patch also reverts the behavior of class variables, but it may be
unnecessary.

-- 
Shugo Maeda

--0016e6d784ee050dca0478b39bf8
Content-Type: text/x-patch; charset=US-ASCII; name="class_eval_1119.diff"
Content-Disposition: attachment; filename="class_eval_1119.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g275emow0

ZGlmZiAtLWdpdCBhL2NvbXBpbGUuYyBiL2NvbXBpbGUuYwppbmRleCA1NTgxZWE4Li40ZjZjZTIx
IDEwMDY0NAotLS0gYS9jb21waWxlLmMKKysrIGIvY29tcGlsZS5jCkBAIC0yNTQ5LDcgKzI1NDks
OCBAQCBjb21waWxlX2NwYXRoKExJTktfQU5DSE9SICpyZXQsIHJiX2lzZXFfdCAqaXNlcSwgTk9E
RSAqY3BhdGgpCiAgICAgfQogICAgIGVsc2UgewogCS8qIGNsYXNzIGF0IGNiYXNlIEZvbyAqLwot
CUFERF9JTlNOMShyZXQsIG5kX2xpbmUoY3BhdGgpLCBwdXRzcGVjaWFsb2JqZWN0LCBJTlQyRklY
KFZNX1NQRUNJQUxfT0JKRUNUX0NCQVNFKSk7CisJQUREX0lOU04xKHJldCwgbmRfbGluZShjcGF0
aCksIHB1dHNwZWNpYWxvYmplY3QsCisJCSAgSU5UMkZJWChWTV9TUEVDSUFMX09CSkVDVF9DT05T
VF9DQkFTRSkpOwogCXJldHVybiBRdHJ1ZTsKICAgICB9CiB9CkBAIC0zNzEwLDcgKzM3MTEsOCBA
QCBpc2VxX2NvbXBpb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