mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-13 17:57:10 +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
|
end
|
||||||
@klass = Class.new do
|
@klass = Class.new do
|
||||||
include Fluentd::Setting::Common
|
include Fluentd::Setting::Common
|
||||||
KEYS = [:key1, :key2, :flag1, :hide, :ch, :child, :string] # FIXME: display "warning: already initialized constant KEYS", but works :(
|
const_set(:KEYS, [:key1, :key2, :flag1, :hide, :ch, :child, :string])
|
||||||
attr_accessor(*KEYS)
|
attr_accessor(*const_get(:KEYS))
|
||||||
booleans :key1, :key2
|
booleans :key1, :key2
|
||||||
flags :flag1
|
flags :flag1
|
||||||
hidden :hide
|
hidden :hide
|
||||||
|
Loading…
Reference in New Issue
Block a user