RubyTk and segfaults

Working with Ruby 2.4.0 and trying to see why it keeps seg faulting. I saw an issue. Tk is 0.1.1, installed via gem install after I updated Ruby.

# ruby -r debug fred.rb
# Borign stuff snipped.

fred.tk:12: pack("side" => "right", "padx" => "50", "pady" => "10")
(rdb:1) n
/usr/local/lib/ruby/gems/2.4.0/gems/tk-0.1.1/lib/tk.rb:4987: `unknown option "-to_ary"' (RuntimeError)
  from /usr/local/lib/ruby/gems/2.4.0/gems/tk-0.1.1/lib/tk.rb:5228:in `pack'
  from fred.tk:12:in `block in <main>'
  from fred.tk:9:in `new'
  from fred.tk:9:in `<main>'
/usr/local/lib/ruby/gems/2.4.0/gems/tk-0.1.1/lib/tk.rb:4987: super(id, *args)

Which seems to relate to the tk.rb:

   4983 if self.kind_of?(TkWindow) && name != "to_ary" && name != "to _str"
    4984 fail NameError,
    4985 "unknown option '#{id}' for #{self.inspect} (deleted w idget?)"
    4986 else
    4987 super(id, *args)
    4988 end
    4989 # fail NameError,
    4990 # "undefined local variable or method `#{name}' for #{sel f.to_s}",
    4991 # error_at
    4992 end

However, when I clone the tk repo and try to run "rake test" like it suggests, I get:

[leam@shaphan tk]$ rake test
rake aborted!
Don't know how to build task 'test' (see --tasks)

(See full trace by running task with --trace)
[leam@shaphan tk]$ rake test --trace
rake aborted!
Don't know how to build task 'test' (see --tasks)
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task_manager.rb:58:in `[]'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:151:in `invoke_task'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/usr/local/bin/rake:22:in `load'
/usr/local/bin/rake:22:in `<main>'

How can I debug this some more?

Message-ID: <700eebed-1492-8881-185f-39389ae1708e@gmail.com>

Working with Ruby 2.4.0 and trying to see why it keeps seg faulting. I
saw an issue. Tk is 0.1.1, installed via gem install after I updated
Ruby.

# ruby -r debug fred.rb
# Borign stuff snipped.

fred.tk:12: pack("side" => "right", "padx" => "50", "pady" => "10")
(rdb:1) n
/usr/local/lib/ruby/gems/2.4.0/gems/tk-0.1.1/lib/tk.rb:4987: `unknown
option "-to_ary"' (RuntimeError)
  from /usr/local/lib/ruby/gems/2.4.0/gems/tk-0.1.1/lib/tk.rb:5228:in
  `pack'
  from fred.tk:12:in `block in <main>'
  from fred.tk:9:in `new'
  from fred.tk:9:in `<main>'
/usr/local/lib/ruby/gems/2.4.0/gems/tk-0.1.1/lib/tk.rb:4987: super(id,
*args)

Please check the context of the error part.
Probably, you call the module method Tk.pack.
The usage of Tk.pack is

···

From: Leam Hall <leamhall@gmail.com>
Subject: RubyTk and segfaults
Date: Wed, 15 Mar 2017 06:41:04 -0400
------------------------------------------------------------------
  Tk.pack(widget [, widget , ...] [, hash_of_options])
    or
  Tk.pack(array_of_widgets [, hash_of_options])
------------------------------------------------------------------

The usage of the instance method TkWindow#pack is
------------------------------------------------------------------
  widget.pack([hash_of_options])
------------------------------------------------------------------

Please see sample scripts in "sample" directory of the source tree of Ruby/Tk,
especially "Ruby/Tk Widget Demos" (in sample/demos-en).
To start the widget demos, execute "ruby sample/demos-en/widget".
You can see the sub-demo's source code,
edit the source code on the editor of the widget demo temporally,
and re-run the modified code to learn by trial and error.
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Department of Artificial Intelligence, Kyushu Institute of Technology