diff options
| author | dearblue <[email protected]> | 2021-06-28 23:21:47 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2021-06-28 23:21:47 +0900 |
| commit | 2d0b50f6f37ae4707ae1b9e34a9961620654bc66 (patch) | |
| tree | 5afc2fafbbff2d543222c2f51731fa04690138f6 /mrbgems/mruby-hash-ext | |
| parent | d63c0df6bcd5851522c4b982dba4e0a93f44a2d7 (diff) | |
| download | mruby-2d0b50f6f37ae4707ae1b9e34a9961620654bc66.tar.gz mruby-2d0b50f6f37ae4707ae1b9e34a9961620654bc66.zip | |
Avoid warnings with `ruby -cw`
```console
% for rb in `git ls-files '*/mrblib/*.rb' 'mrblib'`; do ruby30 -cw $rb > /dev/null; done
mrbgems/mruby-array-ext/mrblib/array.rb:389: warning: assigned but unused variable - ary
mrbgems/mruby-array-ext/mrblib/array.rb:663: warning: assigned but unused variable - len
mrbgems/mruby-hash-ext/mrblib/hash.rb:119: warning: possibly useless use of a variable in void context
mrbgems/mruby-hash-ext/mrblib/hash.rb:259: warning: assigned but unused variable - keys
mrbgems/mruby-io/mrblib/io.rb:229: warning: literal in condition
mrbgems/mruby-io/mrblib/io.rb:280: warning: literal in condition
mrbgems/mruby-string-ext/mrblib/string.rb:347: warning: assigned but unused variable - len
mrbgems/mruby-toplevel-ext/mrblib/toplevel.rb:2: warning: parentheses after method name is interpreted as an argument list, not a decomposed argument
```
Diffstat (limited to 'mrbgems/mruby-hash-ext')
| -rw-r--r-- | mrbgems/mruby-hash-ext/mrblib/hash.rb | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/mrbgems/mruby-hash-ext/mrblib/hash.rb b/mrbgems/mruby-hash-ext/mrblib/hash.rb index 33e2dcb9f..5775913c3 100644 --- a/mrbgems/mruby-hash-ext/mrblib/hash.rb +++ b/mrbgems/mruby-hash-ext/mrblib/hash.rb @@ -116,7 +116,6 @@ class Hash nk.each {|k| h[k] = self[k] } - h self.replace(h) end @@ -256,7 +255,6 @@ class Hash def keep_if(&block) return to_enum :keep_if unless block - keys = [] self.each do |k, v| unless block.call([k, v]) self.delete(k) |
