How to make a mutable Range in Ruby?
Since ranges are immutable you would need to create your own range class that encapsulates the basic range object. This class will give you that and still keep and the methods associated with the basic range object.

class Myrange
  attr_accessor :range
  def initialize(a,b=nil,exc=false)
    if a.is_a? Range
      @range = a
    else
      @range = Range.new(a,b,exc)
    end
  end
  def addto_begin(x)
    Myrange.new(@range.begin + x..@range.end)
  end
  def addto_end(x)
    Myrange.new(@range.begin..@range.end+x)
  end
  def addto_begin!(x)
    @range = @range.begin + x..@range.end
    Myrange.new(@range)
  end
  def addto_end!(x)
    @range = @range.begin..@range.end+x
    Myrange.new(@range)
  end
  def to_s
    @range.to_s
  end
  def inspect
    self.to_s
  end
  def method_missing(*args,&amp;blk)
    @range.send(*args,&amp;blk)
  end
end

x = Myrange.new(1,10)
x = x.addto_begin(3)
p x #=&gt; 4..10
y = x.addto_begin!(3)
p x #=&gt; 7..10
p y.addto_end(3) #=&gt; 7..13
p x.include? 9 #=&gt; true :: Range methods still work