mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-12 09:17:05 +02:00
Merge pull request #89 from kou/suppress-already-initialized-constant-keys-warnings
Suppress "already initialized constant KEYS" warning
This commit is contained in:
commit
39208d7f6f
@ -121,8 +121,8 @@ describe Fluentd::Setting::Common do
|
||||
end
|
||||
@klass = Class.new do
|
||||
include Fluentd::Setting::Common
|
||||
KEYS = [:key1, :key2, :flag1, :hide, :ch, :child, :string] # FIXME: display "warning: already initialized constant KEYS", but works :(
|
||||
attr_accessor(*KEYS)
|
||||
const_set(:KEYS, [:key1, :key2, :flag1, :hide, :ch, :child, :string])
|
||||
attr_accessor(*const_get(:KEYS))
|
||||
booleans :key1, :key2
|
||||
flags :flag1
|
||||
hidden :hide
|
||||
|
Loading…
Reference in New Issue
Block a user