mruby/mruby — pull request #2556 by chasonr (2014-08-23 18:58:33+00:00)
Title: Support override of Float and Fixnum operators

This change allows full override of the +, -, * and / operators in the Float and Fixnum classes, while preserving the optimized code when they are not overridden.

A set of flags is added to struct mrb_state. Each flag, when set, indicates that the method has not been overridden and the optimized code will be used. Overriding the method clears the flag, and vm.c will then generate a method call when the operators are used.