Skip to content

Instantly share code, notes, and snippets.

@e-jambon
Last active June 24, 2016 08:24
Show Gist options
  • Save e-jambon/2c82e85389ee567ceac1b8b2e919bf79 to your computer and use it in GitHub Desktop.
Save e-jambon/2c82e85389ee567ceac1b8b2e919bf79 to your computer and use it in GitHub Desktop.

Revisions

  1. e-jambon renamed this gist Jun 24, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. e-jambon created this gist Jun 23, 2016.
    5 changes: 5 additions & 0 deletions ruby string to proc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    class String
    def to_proc
    eval "Proc.new { |*args| args.first#{self} }"
    end
    end