Project

General

Profile

Actions

Feature #14930

closed

sample/trick2018

Added by znz (Kazuhiro NISHIYAMA) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Target version:
[ruby-dev:50594]

Description

まだ TRICK FINAL の上位作品が sample に追加されていないようです。
https://github.com/tric/trick2018

過去の回も含めて情報を探してみると以下のように、何作品を追加するのかは、以下の情報しかみつけられなかったので、以前の回の上位作品を追加した @mame (Yusuke Endoh) さんに assign しておきます。

https://magazine.rubyist.net/articles/0043/0043-TRICK2013.html

上位 3 (or 4) 作品: Ruby 公式リポジトリにサンプルコードとしてコミットされる (次期 Ruby リリースパッケージにも含まれる予定)

https://magazine.rubyist.net/articles/0053/0053-TRICK2015.html

上位 5 作品: Ruby 公式リポジトリにサンプルコードとしてコミットされる (Ruby 2.3 としてリリース済み)


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #14909: Method call with object that has to_hash method crashes (method with splat and keyword arguments)ClosedActions
Actions #1

Updated by mame (Yusuke Endoh) over 5 years ago

  • Status changed from Assigned to Closed

Applied in changeset trunk|r64008.


sample/trick2018/: adds the top-five entries of TRICK 2018

See https://github.com/tric/trick2018 for TRICK 2018.
Fixes #14930.

Updated by znz (Kazuhiro NISHIYAMA) over 5 years ago

sample/trick2018/03-tompng ですが、trunk では動かないようです。

  • Gemfileruby '2.5.0' に固定されているので、そのままだと trunk で bundle install できない
  • source 'https://rubygems.org' がないので bundle install できないことがある (bundler の挙動がよくわかっていなくてできる場合とできない場合の違いがよくわかっていません)
  • Integer() の第2引数に対して #to_hash が呼ばれて entry.rb で定義されている method_missing が String を返すので、 can't convert Integer to Hash (Integer#to_hash gives String) (TypeError) になって動かない。
    • ruby 2.5.0, 2.5.1 だと動くので 2.6 で入った変更のようです。
    • 2.6.0-preview2 では同じ TypeError でした。
    • 2.6.0-preview1 では in `method_missing': stack level too deep (SystemStackError) でした。
Actions #3

Updated by znz (Kazuhiro NISHIYAMA) over 5 years ago

  • Related to Bug #14909: Method call with object that has to_hash method crashes (method with splat and keyword arguments) added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0