How to define []=

Dear all,

We can define get method `[]’ as:

def
@ary[i]
end

But how do we define the set method `[]=’?

Thank you!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs