use more interesting ruby example
This commit is contained in:
parent
89963dedac
commit
bb489c174c
2 changed files with 12 additions and 2 deletions
12
editor.html
12
editor.html
|
|
@ -210,7 +210,17 @@ At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergr
|
|||
</script>
|
||||
|
||||
<script type="text/editor" id="rubytext">#!/usr/bin/ruby
|
||||
print "Hello Ruby!\n"
|
||||
|
||||
# Program to find the factorial of a number
|
||||
def fact(n)
|
||||
if n == 0
|
||||
1
|
||||
else
|
||||
n * fact(n-1)
|
||||
end
|
||||
end
|
||||
|
||||
puts fact(ARGV[0].to_i)
|
||||
</script>
|
||||
|
||||
<input id="cockpitInput" type="text"/>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit c0cab19cbb5d44df98bae0060c782a6f30464afe
|
||||
Subproject commit 67a380309e5b139a9603334ad9d9f917659f04bc
|
||||
Loading…
Add table
Add a link
Reference in a new issue