Ruby Playground
try
editor
Tab indents and Shift+Tab outdents. Press Escape, then Tab, to leave the editor.
{{ syntaxErrors.length }} syntax error{{ syntaxErrors.length > 1 ? 's' : '' }} — fix before running
- {{ err.message }}
{{ syntaxWarnings.length }} warning{{ syntaxWarnings.length > 1 ? 's' : '' }}
- {{ w.message }}
{{ wasmProgress != null ? ('# Loading Ruby runtime (~10 MB)… ' + wasmProgress + '%') : '# Loading Ruby runtime (~10 MB)…' }}{{ rubyReady ? '# Click Run to execute your Ruby code' : '# Press Run — Ruby (a ~10 MB download) loads the first time' }}{{ rubyError }}
✗ {{ syntaxErrors.length }} syntax error{{ syntaxErrors.length > 1 ? 's' : '' }}
checking syntax…
✓ no syntax errors
checked as you type
ruby {{ wasmVersion }} · downloading {{ wasmProgress }}%
ruby {{ rubyVersion || wasmVersion }} · downloaded
ruby {{ wasmVersion }} · loads on first run
last run {{ lastRunMs }} ms
Ln {{ editorCursor.line }}, Col {{ editorCursor.col }}
{{ editorCursor.lines }} {{ editorCursor.lines === 1 ? 'line' : 'lines' }}
{{ keys.format }} format
© ruby.help