rubycop 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rubycop/analyzer/policy.rb +2 -0
- data/lib/rubycop/version.rb +1 -1
- data/spec/policy_spec.rb +3 -0
- metadata +4 -4
data/lib/rubycop/version.rb
CHANGED
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.
|
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-
|
13
|
+
date: 2011-09-30 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
17
|
-
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: *
|
25
|
+
version_requirements: *70251476621180
|
26
26
|
description: A semantic analyzer for Ruby 1.9
|
27
27
|
email:
|
28
28
|
- dray@envylabs.com
|