Skip to content

Ruby bindings for std::optional<> are broken #617

@peci1

Description

@peci1

Environment

  • OS Version: Ubuntu 20.04
  • Source or binary build?
    source, main branch @ 56b9fcb

Description

The *.i files like Box.i contain a typemap for std::optional<>, but the typemap is not for Ruby - it is for Python. There is no typemap for Ruby.

Steps to reproduce

  1. Start ruby irb and follow this interactive session
rb(main):001:0> require 'math'
=> true
irb(main):002:0> v = Gz::Math::CoordinateVector3.new
irb(main):003:0> v.X()
Traceback (most recent call last):
        5: from /usr/bin/irb:23:in `<main>'
        4: from /usr/bin/irb:23:in `load'
        3: from /usr/lib/ruby/gems/2.7.0/gems/irb-1.2.1/exe/irb:11:in `<top (required)>'
        2: from (irb):3
        1: from (irb):3:in `X'
ArgumentError (wrong # of arguments(0 for 1))

This was discussed in #616 (comment) .

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions