File: introduce3.rb

package info (click to toggle)
netbeans-ide 6.0.1%2Bdfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: lenny
  • size: 741,536 kB
  • ctags: 613,961
  • sloc: java: 3,969,489; xml: 336,553; jsp: 11,861; ruby: 10,091; cpp: 4,127; sh: 3,417; ansic: 1,734; sql: 1,306; haskell: 1,019; makefile: 487; perl: 403; objc: 288; php: 120
file content (30 lines) | stat: -rw-r--r-- 777 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
def test
  alreadyexists1 = 40
  if true
     alreadyexists2 = 50
     alreadyexists3 = 50
  end
  notusedinexpression = 60
  [1,2,3].each{|methodcall| puts "not a method call just confusing the below name check" }
  # Start of expression
  newvar = 50
  puts alreadyexists1
  puts alreadyexists2
  [1,2,3].each {|alreadyexists3| puts alreadyexists3 }
  puts methodcall
  alreadyexists2 = alreadyexists1 + 10
  alreadyexists3 = alreadyexists1 + 10
  puts alreadyexists3
  [1,2,3].each {|methodcall2| puts "not a method call just confusing the below name check" }
  notusedoutsideblock = 50
  puts notusedoutsideblock
  notusedanywhere = 30
  usedlater = 30
  # end of refactored expression
  if (true)
    puts usedlater
    puts alreadyexists2
    puts methodcall2
  end
end