if (value.isNil()) {
return c.searchInternalModuleVariable("vpRoundingMode");
}
RoundingMode javaRoundingMode = javaRoundingModeFromRubyRoundingMode(context.runtime, value);
RubyFixnum roundingMode = context.runtime.newFixnum(javaRoundingMode.ordinal());
c.setInternalModuleVariable("vpRoundingMode", roundingMode);
return c.searchInternalModuleVariable("vpRoundingMode");
}
throw context.runtime.newTypeError("first argument for BigDecimal#mode invalid");