class Fixnum
  def inc(val=1)
    self += val
  end
end

1.inc

:-)

"Stephan K?mper" <Stephan.Kaemper / Schleswig-Holstein.de> schrieb im
Newsbeitrag news:b5t2t0$2cuq4p$1 / ID-96582.news.dfncis.de...
> daniel wrote:
> > hello,
> >
> > in c++ I can write ``i++.
> > The same in ruby: ``i=i+1.
>
> Hi Daniel,
>
> how about
>
> i += 1        ?
>
>
> And, no there's no way to do i++ in Ruby. For a discussion search this
> news group (resp. mailing list).
>
> Happy programming
>
> Stephan
>
>