remove Core.init, default precision is actually a default

This commit is contained in:
Gwenhael Le Moine 2021-11-23 12:59:45 +01:00
parent 655a14e36e
commit fe799845aa
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
2 changed files with 1 additions and 7 deletions

View file

@ -14,17 +14,13 @@ module Rpn
include BigMath include BigMath
def precision def precision
@precision @precision or 12
end end
def precision=( value ) def precision=( value )
@precision = value @precision = value
end end
def init
@precision = 12 # default precision for math operations
end
def stack_extract( stack, needs ) def stack_extract( stack, needs )
raise 'Not enough elements' if stack.size < needs.size raise 'Not enough elements' if stack.size < needs.size

View file

@ -15,8 +15,6 @@ module Rpn
@dictionary = Dictionary.new @dictionary = Dictionary.new
@parser = Parser.new @parser = Parser.new
@runner = Runner.new @runner = Runner.new
Rpn::Core.init
end end
def run def run