Joined June 2012
·

Charlie Sanders

Software Engineer at Asynchrony
·
St. Louis
·
·
·

@mbillard blank? is a Rails thing, not a core ruby thing.

["foo", "bar", "", nil].compact.reject(&:empty?)

does the right thing in situations where ActiveSupport isn't available.

Posted to pbcopy and pbpaste on Linux over 1 year ago

@rstacruz I think that the error message given on, for example, Ubuntu is much more useful when the alias is defined, i.e.

The program 'xsel' is currently not installed.  You can install it by typing:
sudo apt-get install xsel

instead of:

No command 'pbcopy' found, did you mean:
  Command 'pcopy' from package 'pcopy' (universe)
  Command 'bcopy' from package 'bacula-sd-pgsql' (main)
  Command 'bcopy' from package 'bacula-sd-sqlite3' (main)
  Command 'bcopy' from package 'bacula-sd-mysql' (main)
pbcopy: command not found
Achievements
320 Karma
23,758 Total ProTip Views