タグ

2009年10月3日のブックマーク (2件)

  • 川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
  • emerge (Linux Reviews)

    > Linux Reviews > man >emerge emerge.1.man 1. emerge.1.man Manpage of EMERGE EMERGE Section: Portage (1) Updated: Jun 2003 Index Return to Main Contents ̾�� emerge - Portage �����ƥ��ؤΥ��ޥ��ɥ饤�󥤥󥿥ե����� ���� emerge [options] [action] [ebuild | tbz2file | class | dependency] ... emerge --sync | --info | --search emerge --help [system | config | sync] emerge --version | -V ���� emerge �� Portage ���