Almost everything in (MRI) Ruby can be modified on-the-fly (which is itself problematic), except compiled-in methods and classes have some (lots) limitations on runtime modification of built-in things.
For example, here's one way to instantly break most programs:
String.class_eval { undef_method :initialize }
While it might be possible with some other hackery to restore this, it's not guaranteed. In general, if you're modifying core Ruby stuff on the fly, it should be done safer on a limited basis with refinements. https://docs.ruby-lang.org/en/2.5.0/syntax/refinements_rdoc....