remove Core.init, default precision is actually a default
This commit is contained in:
parent
655a14e36e
commit
fe799845aa
2 changed files with 1 additions and 7 deletions
|
@ -14,17 +14,13 @@ module Rpn
|
|||
include BigMath
|
||||
|
||||
def precision
|
||||
@precision
|
||||
@precision or 12
|
||||
end
|
||||
|
||||
def precision=( value )
|
||||
@precision = value
|
||||
end
|
||||
|
||||
def init
|
||||
@precision = 12 # default precision for math operations
|
||||
end
|
||||
|
||||
def stack_extract( stack, needs )
|
||||
raise 'Not enough elements' if stack.size < needs.size
|
||||
|
||||
|
|
2
repl.rb
2
repl.rb
|
@ -15,8 +15,6 @@ module Rpn
|
|||
@dictionary = Dictionary.new
|
||||
@parser = Parser.new
|
||||
@runner = Runner.new
|
||||
|
||||
Rpn::Core.init
|
||||
end
|
||||
|
||||
def run
|
||||
|
|
Loading…
Add table
Reference in a new issue