What have you found for these years?

2008-11-03

[rbx ] include_remove (2)

Thanks to poga, here's another approach to uninclude.

http://github.com/dan-manges/mixology

In addition to MRI and Rubinius, it supports JRuby as well,
of course, via .java program. It's only possible implemented
in Ruby in Rubinius, currently.

And I don't know why the author reimplemented "extend" and
named it to "mixin". If it's just for naming consistency,
why not just alias extend to mixin?

It looks like mixin works just like extend, and poga
told me that it looks fine if you mix usage of extend
and unmix under MRI 1.8.6.

And I think it's the same in Rubinius to my knowledge.

Anyway, I found another approach I saw previously.

http://github.com/why/mixico

It has a nice README to tell what's happening using mixico.
It came from Mixing Our Way Out Of Instance Eval?,
and I DO hate calling instance_eval with a block outside the
lexical scope. It causes lots of confusing because you change
the scoping rule from lexical scope. Dynamic scoping causes bugs
if you don't program very, very carefully.

Yes, I never fall in love with RSpec, and it uses the trick too,
ruby 1.9 compat; constant lookup rules
and it caused bugs in ruby 1.9 because the scoping rule changed.

I think the reasons I don't like RSpec it's not because RSpec use
evil things, it's because I have a different taste with RSpec, see:
This is not longer a DSL. It's broken English.

People have taste, and worlds become colorful! :D

0 retries:

Post a Comment

All texts are licensed under CC Attribution 3.0