Skip to content

Commit 60363a4

Browse files
committed
Make Ruby warnings visible and reduce warnings.
1 parent 209cbc3 commit 60363a4

4 files changed

Lines changed: 5 additions & 16 deletions

File tree

lib/rdf/model/list.rb

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -280,19 +280,6 @@ def *(int_or_str)
280280
end
281281
end
282282

283-
##
284-
# Returns the element at `index`.
285-
#
286-
# @example
287-
# RDF::List[1, 2, 3][0] #=> RDF::Literal(1)
288-
#
289-
# @param [Integer] index
290-
# @return [RDF::Term]
291-
# @see http://ruby-doc.org/core-2.2.2/Array.html#method-i-5B-5D
292-
def [](index)
293-
at(index)
294-
end
295-
296283
##
297284
# Element Assignment — Sets the element at `index`, or replaces a subarray from the `start` index for `length` elements, or replaces a subarray specified by the `range` of indices.
298285
#

lib/rdf/util/cache.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def initialize(capacity = nil)
127127
def [](key)
128128
if (ref = @cache[key])
129129
if ref.weakref_alive?
130-
value = ref.__getobj__ rescue nil
130+
ref.__getobj__ rescue nil
131131
else
132132
@cache.delete(key)
133133
nil

lib/rdf/util/uuid.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ def self.generate(format: :default)
2222
begin
2323
require 'uuid'
2424
::UUID.generate(format)
25-
rescue LoadError => e
25+
rescue LoadError
2626
begin
2727
require 'uuidtools'
2828
::UUIDTools::UUID.random_create.hexdigest
29-
rescue LoadError => e
29+
rescue LoadError
3030
raise LoadError.new("no such file to load -- uuid or uuidtools")
3131
end
3232
end

spec/spec_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ def fixture_path(filename)
4242

4343
Encoding.default_external = Encoding::UTF_8
4444
Encoding.default_internal = Encoding::UTF_8
45+
46+
$VERBOSE = true

0 commit comments

Comments
 (0)