Skip to content

BasicObject's instance methods #3417

@catsidhe

Description

@catsidhe
BasicObject.instance_methods

Ruby:

[:!, :==, :!=, :__send__, :equal?, :instance_eval, :instance_exec, :__id__]

mruby:

[:method_missing, :initialize, :!]

Is there a reason for this difference? In particular, #__send__ can be pretty useful.

One workaround is to use eval("obj.#{method_name}(*args, &block)"), but it's obviously a poor solution.

Another potential workaround:

Kernel.instance_method(:send).bind(obj).call(:method_name)

crashes with:

Segmentation fault: 11

(both Object and BasicObject)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions