4 ms·
What gems modify the Ruby code?
by jamesbritt 13y ago
What gems modify the Ruby code?
- mbillie1 13y agoI assume he means: any gems that monkey-patch any of the built-in classes. I believe ActiveSupport modifies things like Fixnum (1.days.from_now, for example).
- reiz 13y agoYes. That's what I meant.
- jamesbritt 13y agoAh. Ok. I was thinking something changing core files on disk. I bet that's doable ... Change string.c, recompile, if a gem can execute arbitray code.
- klibertp 13y agoDoes it really happen at install time or (like in Python) at runtime everytime the package/module/gem is loaded/required?
- evilduck 13y agoActiveSupport doesn't modify the base Ruby classes until it's been loaded. Merely installing gems will not impact anything except disk space.
- hapless 13y agopuppet, facter, rake, mongrel use 'sed' to edit the code on the fly at install time, to set shebang lines etc There are surely many others, these are just the ones I have at hand as examples.