Mercurial > hg > forks > UniversalIndentGUI
annotate indenters/example.rb @ 777:f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@1054 59b1889a-e5ac-428c-b0c7-476e01d41282
author | thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282> |
---|---|
date | Tue, 27 Dec 2011 13:28:58 +0000 |
parents | 0745e5a3a9df |
children |
rev | line source |
---|---|
777
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
1 #!/usr/bin/env ruby |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
2 #odd assignments |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
3 BEGIN { |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
4 puts "a block i have never seen used" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
5 } |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
6 entry = Post.update(params["id"],{:title => params["title"],:post => params['post'],:context => params["context"],:creator => session[:creator]}) |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
7 definition = "moo" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
8 puts moo |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
9 moo = case 3 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
10 when 2 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
11 "unless proceeding to 3" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
12 when 3 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
13 "right" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
14 when 4 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
15 "one to many" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
16 when 5 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
17 "three sir" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
18 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
19 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
20 puts moo |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
21 def pointless_call |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
22 if false |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
23 "Sdf" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
24 elsif true |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
25 "df" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
26 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
27 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
28 puts pointless_call |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
29 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
30 if true |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
31 puts "moo" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
32 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
33 i = 5 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
34 def title |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
35 doc = load_page |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
36 title = doc.search("h1").first.inner_html |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
37 clean_html_tags(title) |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
38 clean_9_0(title) |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
39 title |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
40 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
41 if i |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
42 if true |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
43 puts "moo" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
44 elsif i < 3 * 23 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
45 "sdf" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
46 else |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
47 "df" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
48 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
49 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
50 class Tested |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
51 def sadf |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
52 "asdf" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
53 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
54 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
55 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
56 module Moo |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
57 def t434t |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
58 "352" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
59 end#comments at the end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
60 end #comments again debug_if |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
61 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
62 =begin |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
63 block comments |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
64 should have no formatting done |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
65 ever |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
66 =end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
67 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
68 #java formatter test parts |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
69 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
70 ping(argument) {|block| |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
71 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
72 } |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
73 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
74 if (moo) |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
75 cow; |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
76 else |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
77 dog; |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
78 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
79 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
80 x = 5 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
81 x = 5 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
82 x = 5 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
83 x = 5 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
84 IN_OUTS_RX = /^(def|class|module|begin|case|if|unless|loop|while|until|for)/ |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
85 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
86 #end java formatter test parts |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
87 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
88 here_doc = <<-EOX |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
89 This should not |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
90 loose its formatting |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
91 EOX |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
92 dsfffffffff=[2, 3, 4, 5] |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
93 print <<-STRING1, <<-STRING2 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
94 Concat |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
95 STRING1 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
96 enate |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
97 STRING2 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
98 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
99 unless false |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
100 "4" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
101 else |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
102 "5" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
103 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
104 x = 2 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
105 while x > 0 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
106 x -= 1 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
107 if x == 1 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
108 "p" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
109 else |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
110 "3" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
111 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
112 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
113 x = 2 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
114 until x < 0 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
115 x -= 1 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
116 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
117 a = 3 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
118 a *= 2 while a < 100 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
119 a -= 10 until a < 100 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
120 print "Hello\n" while false |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
121 print "Goodbye\n" while false |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
122 3.times do |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
123 print "Ho! " |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
124 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
125 0.upto(9) do | x| |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
126 print x, " " |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
127 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
128 0.step(12, 3) {|x | print x, " " } |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
129 x = 0 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
130 loop { |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
131 if x == 5 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
132 break |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
133 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
134 x += 1 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
135 } |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
136 (1..4).each {|x| |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
137 puts x |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
138 } |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
139 (1..4).each do | x| |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
140 puts x |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
141 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
142 for i in (1..4) |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
143 puts i |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
144 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
145 i = 0 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
146 loop do |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
147 i += 1 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
148 next if i < 3 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
149 print i |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
150 break if i > 4 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
151 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
152 string = "x+1" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
153 begin |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
154 eval string |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
155 rescue SyntaxError, NameError => boom |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
156 print "String doesn't compile: " + boom |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
157 rescue StandardError => bang |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
158 print "Error running script: " + bang |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
159 ensure |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
160 print "thank you pick axe" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
161 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
162 a = "Fats ' ' \\\" do Waller" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
163 a =~ /\/a/ |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
164 if true then print "a" end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
165 x = 3 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
166 unless true then print "a" end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
167 x = 3 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
168 begin raise "cow" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
169 rescue Exception => e |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
170 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
171 x = 3 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
172 puts i += 1 while i < 3 # ruby |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
173 x = 3 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
174 klass = Fixnum |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
175 #its like a do while loop |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
176 begin |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
177 print klass |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
178 klass = klass.superclass |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
179 print " < " if klass |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
180 end while klass |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
181 puts |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
182 p Fixnum.ancestors |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
183 boom = %q / this is a spinal tap/ |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
184 boom = %q - string- |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
185 boom =%q(a (nested) string) |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
186 x = "done with string" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
187 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
188 puts "In parent,term = #{ENV['TERM']}" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
189 cow = if true |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
190 "moot" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
191 else |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
192 "woot" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
193 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
194 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
195 fork do |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
196 puts "Start of child 1,term=#{ENV['TERM']}" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
197 ENV['TERM'] = "ansi" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
198 fork do |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
199 puts "Start of child 2, term=#{ENV['TERM']}" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
200 begin |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
201 if moo < 3 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
202 p "asdf4" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
203 elsif 9 * 0 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
204 p "asde" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
205 else |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
206 puts cow |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
207 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
208 end while x > 3 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
209 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
210 Process.wait |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
211 puts "End of child 1, term=#{ENV['TERM']}" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
212 end |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
213 Process.wait |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
214 puts "Back in parent, term=#{ENV['TERM']}" |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
215 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
216 OPENOFFICE = true # do Openoffice - Spreadsheet Tests? |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
217 EXCEL = true # do Excel Tests? |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
218 GOOGLE = true # do Google - Spreadsheet Tests? |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
219 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
220 OPENOFFICEWRITE = false # experimental: |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
221 |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
222 END{ |
f55b7f34a3e1
Updated Ruby Script Beautifier to version 2.9.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
488
diff
changeset
|
223 puts "another block i have never seen" |
488
0745e5a3a9df
Changed the line ending encoding of the ruby example file.
thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
parents:
487
diff
changeset
|
224 } |