以下のコード断片を追加して対処します。
if RUBY_VERSION < '1.9.0' then class Hash def to_s result = "{" keys.each_with_index do |key, index| result << ", " if 0 < index result << "#{key} => #{self[key]}" end result << "}" return result end end end
![]() |
君の瞳はまるでルビー - Ruby 関連まとめサイト
|
以下のコード断片を追加して対処します。 if RUBY_VERSION < '1.9.0' then class Hash def to_s result = "{" keys.each_with_index do |key, index| result << ", " if 0 < index result << "#{key} => #{self[key]}" end result << "}" return result end end end
|