diff --git a/Lib/ruby/rubyiterators.swg b/Lib/ruby/rubyiterators.swg index b2482a61d..96ca1e62b 100644 --- a/Lib/ruby/rubyiterators.swg +++ b/Lib/ruby/rubyiterators.swg @@ -72,7 +72,8 @@ namespace swig { virtual self_type* previous( size_t n = 1 ) { - return this->advance( -n ); + ptrdiff_t nn = n; + return this->advance( -nn ); } virtual VALUE to_s() const { @@ -228,7 +229,8 @@ namespace swig { virtual self_type* previous( size_t n = 1 ) { - return this->advance( -n ); + ptrdiff_t nn = n; + return this->advance( -nn ); } bool operator == (const ConstIterator& x) const