get plus (+) working

alas, new integer is not created yet
This commit is contained in:
Torsten Ruger
2018-03-31 19:37:24 +03:00
parent a2173645b3
commit 5b92b6b785
3 changed files with 48 additions and 29 deletions

View File

@ -19,6 +19,11 @@ module Parfait
def self.integer_index
3 # 1 type, 2 next_i
end
def get_internal_word( index )
return super(index) unless index == Integer.integer_index
return @value
end
# :integer?, :odd?, :even?, :upto, :downto, :times, :succ, :next, :pred, :chr, :ord, :to_i, :to_int, :floor,
# :ceil, :truncate, :round, :gcd, :lcm, :gcdlcm, :numerator, :denominator, :to_r, :rationalize,
# :singleton_method_added, :coerce, :i, :+@, :-@, :fdiv, :div, :divmod, :%, :modulo, :remainder, :abs, :magnitude,