タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

devとrubyとdebugに関するMakotsのブックマーク (2)

  • Hello from Ruby Jard | Ruby Jard

    MIT LicenseRuby Jard is open-source, built for community. All contributions are welcome. Powered by Byebug and PryRuby Jard's core is Byebug, combine with Pry REPL power. This brings battle-tested reliability, flexibility, and tons of cool features. Pure Ruby and minimal dependenciesJard is written in pure Ruby, with a slim set of dependencies, compatible with a wide range of systems. Easy to UseY

    Hello from Ruby Jard | Ruby Jard
  • 川o・-・)<2nd life

    Perl での print debug の方法の紹介がブーム(?)だったので、自分がよく行ってる Ruby での debug 方法7つについて書いてみます。 p ご存じの人も多い Kernel#p メソッド。これを使うとオブジェクトの内容を見やすい形で出力してくれます。 >> p ({:foobar => :baz}) {:foobar=>:baz}Object#inspect を使うと、p で出力するときと同じ文字列を String として取得できます。 >> puts ({:foobar => :baz}).inspect {:foobar=>:baz}初心者の頃この p での出力を使う方法がわからなくて困った記憶が…。 pp pp というライブラリを使うと、p より、より見やすい形式で出力してくれます。たとえば >> a = Array.new(10) { {:foobar => :

    川o・-・)<2nd life
  • 1