rubycop 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -74,6 +74,7 @@ module Rubycop
74
74
  eval
75
75
  exec
76
76
  exit
77
+ dup
77
78
  fail
78
79
  fork
79
80
  gets
@@ -88,6 +89,7 @@ module Rubycop
88
89
  readlines
89
90
  redo
90
91
  remove_const
92
+ retry
91
93
  require
92
94
  send
93
95
  set_trace_func
@@ -1,3 +1,3 @@
1
1
  module Rubycop
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
data/spec/policy_spec.rb CHANGED
@@ -57,6 +57,8 @@ describe Rubycop::Analyzer::Policy do
57
57
  it { should_not allow('`ls` rescue 1') }
58
58
  it { should_not allow('x rescue `ls`') }
59
59
  it { should_not allow('begin; x; rescue (`ls`; RuntimeError) => err; end') }
60
+ it { should_not allow(%{begin ; begin ; ":D" ; rescue ; retry ; ensure ; raise ":D" ; end ; rescue ; retry ; end})}
61
+ it { should_not allow(%{begin ; while(true) ; 'x' ; end ; rescue Exception ; retry ; end}) }
60
62
  end
61
63
 
62
64
  context "blocks" do
@@ -136,6 +138,7 @@ describe Rubycop::Analyzer::Policy do
136
138
  it { should_not allow('trap("EXIT") { }') }
137
139
  it { should_not allow('undef :raise') }
138
140
  it { should_not allow('undef raise') }
141
+ it { should_not allow(%{''.dup})}
139
142
  end
140
143
  end
141
144
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubycop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-09-28 00:00:00.000000000Z
13
+ date: 2011-09-30 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
17
- requirement: &70095569001460 !ruby/object:Gem::Requirement
17
+ requirement: &70251476621180 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,7 +22,7 @@ dependencies:
22
22
  version: '0'
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *70095569001460
25
+ version_requirements: *70251476621180
26
26
  description: A semantic analyzer for Ruby 1.9
27
27
  email:
28
28
  - dray@envylabs.com