go-mruby icon indicating copy to clipboard operation
go-mruby copied to clipboard

Array is missing methods for mutating it

Open errordeveloper opened this issue 8 years ago • 2 comments

At the very least I need Add(item *mruby.MrbValue). Is this is problematic or simply unimplemented as it was not needed?

cc @erikh

errordeveloper avatar Dec 21 '16 19:12 errordeveloper

Also converting Go slices to arrays should be fairly simple. I suppose we can leave []interface{} aside, just the basic slices like []string{} would be very handy. Also hashes from basic maps, like map[string]string{} shouldn't require user to implement conversion, isn't it? Or am I missing something?

errordeveloper avatar Dec 31 '16 13:12 errordeveloper

Agree with the collection methods, but I think personally that string coercion should be left up to the user. Just offering my opinion.

Would you be willing to patch in the collection methods? I can help you on irc or something if you wanted.

On Sat, Dec 31, 2016 at 2:51 PM, Ilya Dmitrichenko <[email protected]

wrote:

Also converting Go slices to arrays should be fairly simple. I suppose we can leave []interface{} aside, just the basic slices like []string{} would be very handy. Also hashes from basic maps, like map[string]string{} shouldn't require user to implement conversion, isn't it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mitchellh/go-mruby/issues/47#issuecomment-269865894, or mute the thread https://github.com/notifications/unsubscribe-auth/AABJ6yqExn5OdiYQOg-o7QzxgkQtBjrsks5rNl3FgaJpZM4LTULz .

erikh avatar Dec 31 '16 16:12 erikh