Sha256: 5d0553fa06e91c301811b32f80c5fea49d2bddca30adfbf5d4da623d8086215f
Contents?: true
Size: 531 Bytes
Versions: 17
Compression:
Stored size: 531 Bytes
Contents
#!/usr/bin/ruby # 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) class Range def to_json(*a) { 'json_class' => self.class.name, # = 'Range' 'data' => [ first, last, exclude_end? ] }.to_json(*a) end end {:id => 34, :key => "value"} herDocs = [<<'FOO', <<BAR, <<-BAZ, <<-`EXEC`] #comment FOO #{literal} FOO BAR #{fact(10)} BAR BAZ indented BAZ echo hi EXEC puts herDocs
Version data entries
17 entries across 17 versions & 1 rubygems