ruby.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
If you are interested in the Ruby programming language, come join us! Tell us about yourself when signing up. If you just want to join Mastodon, another server will be a better place for you.

Administered by:

Server stats:

1.1K
active users

Bradley Schaefer

In IRB there’s a `copy` command that will copy to your clipboard.

@soulcutter wait, really? This would save me a LOT of trouble when I have difficulty copying massive hashes

@zmanguy yup. It’s not well known, but can be handy

@soulcutter You just made my day. Maybe even my week. Thanks !

@soulcutter I’m on a Mac. I didn’t realize there was a builtin Copy in IRB, but for years I’ve used `pbcopy` to copy to the clipboard and `pbpaste` to paste from the clipboard.
(pb is for PasteBoard, which is often used interchangeably with clipboard.

lines = `pbpaste`.split("\n")
is a command I use all the time to get lines of text from the clipboard into an array