For example, using the same approach as JRuby. See here for the rationale: https://groups.google.com/forum/?fromgroups#!topic/rubinius-dev/fB1bosW5URY That thread doesn't show the last two replies, so if more details are needed, please ask.