Skip to content

Commit a0344bc

Browse files
committed
Fix lint problems
1 parent b7fb7b9 commit a0344bc

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

lib/truffle/strscan.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ScanError < StandardError
3939
end
4040

4141
class StringScanner
42-
42+
4343
Id = 'None$Id'.freeze
4444
Version = '1.0.0'.freeze
4545

@@ -321,7 +321,7 @@ def scan_internal(pattern, advance_pos, getstr, headonly)
321321
# onwards, even if headonly is set. Instead, remove the ^. This could
322322
# possibly be fixed in Joni instead, or maybe there is already some option
323323
# we're not using.
324-
324+
325325
if pattern.source[0] == '^' && pos > 0
326326
pattern = Regexp.new(pattern.source[1..-1])
327327
headonly = true

src/main/ruby/core/array.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ def sample_many(count, rng)
11071107
result.swap c, rng.rand(size)
11081108
end
11091109

1110-
return count == size ? result : result[0, count]
1110+
count == size ? result : result[0, count]
11111111
end
11121112

11131113
private :sample_many

src/main/ruby/core/enumerable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ def min_max(relative)
707707
unless comp
708708
raise ArgumentError, "comparison of #{o.class} with #{chosen} failed"
709709
end
710-
710+
711711
if (Comparable.compare_int(comp) <=> 0) == relative
712712
chosen = o
713713
end

src/main/ruby/core/io.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,7 @@ def read_to_separator
14351435
end
14361436

14371437
str << @buffer.shift
1438-
yield_string(str) { |s| yield s }
1438+
yield_string(str) { |y| yield y }
14391439
end
14401440

14411441
# method B, E

src/main/ruby/core/process.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ module XID
862862
def re_exchangeable?
863863
true
864864
end
865-
865+
866866
def sid_available?
867867
true
868868
end
@@ -921,7 +921,7 @@ def rid
921921
module GID
922922
class << self
923923
extend XID
924-
924+
925925
def change_privilege(gid)
926926
gid = Truffle::Type.coerce_to gid, Integer, :to_int
927927

src/main/ruby/core/struct.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def check_index_var(var)
201201
if var < -a_len
202202
raise IndexError, "offset #{var + a_len} too small for struct(size:#{a_len})"
203203
end
204-
var = _attrs[var]
204+
_attrs[var]
205205
end
206206

207207
private :check_index_var

0 commit comments

Comments
 (0)