Class: JRuby::ScalaSupport::Seq::Mutable
- Includes:
- Common
- Defined in:
- lib/jruby/scala_support.rb
Instance Method Summary collapse
Methods included from Common
Instance Method Details
#[]=(index, value) ⇒ Object
179 180 181 182 183 184 185 186 187 188 |
# File 'lib/jruby/scala_support.rb', line 179 def []=(index, value) if index < 0 @raw.update(size + index, value.to_scala) elsif index >= size (index - size + 1).times { @raw.send(:"+=", nil) } self[index] = value else @raw.update(index, value.to_scala) end end |