Skip to content

Instantly share code, notes, and snippets.

@pocke
Created April 30, 2014 10:56
Show Gist options
  • Save pocke/11423752 to your computer and use it in GitHub Desktop.
Save pocke/11423752 to your computer and use it in GitHub Desktop.
eval s="a = 1; def fac(n);n == 1 ? 1 : n*fac(n-1);end; $>.tty? ? puts(fac(a)) : puts('eval s='+s.inspect.sub(/([0-9]+)/){($1.to_i + 1).to_s})"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment