Module: Trxl::MultitiveOp1
- Defined in:
- lib/trxl/trxl_grammar.rb
Instance Method Summary collapse
Instance Method Details
#apply(a, b) ⇒ Object
3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 |
# File 'lib/trxl/trxl_grammar.rb', line 3358 def apply(a, b) begin result = super if result.respond_to?(:nan?) && result.nan? raise Trxl::DivisionByZeroError, "Division by zero: '#{a} % #{b}'" end result rescue ZeroDivisionError raise Trxl::DivisionByZeroError, "Division by zero: '#{a} % #{b}'" end end |