Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

DragonRuby Game Toolkit

An intuitive 2D game engine. Fast, cross-platform, tiny, hot loaded. · By DragonRuby

The method "chunk" doesn't exist on class Array

A topic by jacksonmills created Aug 26, 2019 Views: 193 Replies: 1
Viewing posts 1 to 2

Hey all,

Was coding this morning and ran into this:

The method named "chunk" doesn't exist on (class Array (included_modules [GTK::Primitive:│
:ConversionCapabilities, Enumerable]) ).

Which I found strange; according to Ruby 1.9.2's docs, #chunk should be available:

What's going on? Is it Ruby 1.9.2 or something else?

I've also noticed some interesting irregularities; for instance, it seems cannot create a subclass of a class with an `initialize` method with a different arity/cardinality than it's parent; i.e if I define `class Foo; def initialize; end; end; class Bar < Foo; def initialize a; end; end;`, you'll get an ArgumentError if you ever try to instantiate an instance of the `Bar` class.

So far there are a lot of things I enjoy about this package but I have to say it would be nice if more clarity was provided regarding the Ruby environment that it's running.  It's really jarring to hit speed-bumps like this when normally in Ruby it would `just work`.


DragonRuby is a new Ruby (it isn't mRuby, nor is it MRI ruby). We are pushing for parity for MRI, but only if the specific api can be supported on _all_ of the platforms we are targeting. Any gaps you see, just let me know and I'll see what needs to be added.

It's probably best to reference mRuby docs, since we used that as a starting point.