Skip to content

Commit

Permalink
Suppress "literal string will be frozen in the future" warning (#353)
Browse files Browse the repository at this point in the history
Before change:

```console
$ rake 2>&1 | grep 'iruby.*frozen'
/Users/zzz/src/github.com/SciRuby/iruby/lib/iruby/formatter.rb:128: warning: literal string will be frozen in the future
/Users/zzz/src/github.com/SciRuby/iruby/lib/iruby/formatter.rb:96: warning: literal string will be frozen in the future
```

After change:

```console
$ rake 2>&1 | grep 'iruby.*frozen'
```
  • Loading branch information
tikkss authored Oct 22, 2024
1 parent ebebd95 commit 12b07c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/iruby/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def table(obj, maxrows: 15, maxcols: 15, **options)
rows2 = rows[-maxrows / 2 + 1..-1]
end

table = '<table>'
table = +'<table>'

if header1 && options[:header] != false
table << '<tr>' << header1.map {|k| "<th>#{cell k}</th>" }.join
Expand Down

0 comments on commit 12b07c4

Please sign in to comment.