Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • \$\begingroup\$ Shouldn't sleep .1 work too? \$\endgroup\$ Commented Apr 26, 2012 at 20:44
  • \$\begingroup\$ Nope, not in 1.9. SyntaxError: (irb):1: no .<digit> floating literal anymore; put 0 before dot. But i'll get back to that if i need it in the future, thanks! \$\endgroup\$ Commented Apr 26, 2012 at 20:47
  • \$\begingroup\$ If you're on 1.9 you can use char literals to shorten a few things, e.g. ?* instead of '*', etc. \$\endgroup\$ Commented Apr 26, 2012 at 21:08
  • \$\begingroup\$ Using Ruby 1.9.3 under Win7, this prints rectangles one after (below) the other, each having ←[2J←[f+------------------+ as the first line. \$\endgroup\$ Commented Apr 27, 2012 at 1:35
  • \$\begingroup\$ then change $> << "\e[2J\e[f"+f to 'cls';$><<f (use backticks for cls) \$\endgroup\$ Commented Apr 27, 2012 at 8:16