File tree Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -661,11 +661,6 @@ Lint/RescueException:
661
661
- ' lib/puppet/util/command_line/trollop.rb'
662
662
- ' util/rspec_grouper'
663
663
664
- Lint/ReturnInVoidContext :
665
- Exclude :
666
- - ' lib/puppet/type/component.rb'
667
- - ' lib/puppet/util/suidmanager.rb'
668
-
669
664
Lint/SelfAssignment :
670
665
Exclude :
671
666
- ' lib/puppet/pops/evaluator/evaluator_impl.rb'
Original file line number Diff line number Diff line change 15
15
# Override how parameters are handled so that we support the extra
16
16
# parameters that are used with defined resource types.
17
17
def []( param )
18
- return super if self . class . valid_parameter? ( param )
19
- @extra_parameters [ param . to_sym ]
18
+ if self . class . valid_parameter? ( param )
19
+ super
20
+ else
21
+ @extra_parameters [ param . to_sym ]
22
+ end
20
23
end
21
24
22
25
# Override how parameters are handled so that we support the extra
23
26
# parameters that are used with defined resource types.
24
27
def []=( param , value )
25
- return super if self . class . valid_parameter? ( param )
26
- @extra_parameters [ param . to_sym ] = value
28
+ if self . class . valid_parameter? ( param )
29
+ super
30
+ else
31
+ @extra_parameters [ param . to_sym ] = value
32
+ end
27
33
end
28
34
29
35
# Initialize a new component
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ def osx_maj_ver
24
24
25
25
def groups = ( grouplist )
26
26
begin
27
- return Process . groups = grouplist
27
+ Process . groups = grouplist
28
28
rescue Errno ::EINVAL => e
29
29
#We catch Errno::EINVAL as some operating systems (OS X in particular) can
30
30
# cause troubles when using Process#groups= to change *this* user / process
@@ -37,9 +37,7 @@ def groups=(grouplist)
37
37
# operating system side. Therefore we catch the exception and look whether
38
38
# we run under OS X or not -- if so, then we acknowledge the problem and
39
39
# re-throw the exception otherwise.
40
- if osx_maj_ver and not osx_maj_ver . empty?
41
- return true
42
- else
40
+ if !osx_maj_ver || osx_maj_ver . empty?
43
41
raise e
44
42
end
45
43
end
You can’t perform that action at this time.
0 commit comments