Skip to content

undefined method `+' for nil:NilClass (NoMethodError) #1

@shibafu528

Description

@shibafu528

プラグイン導入後の初回起動時にクラッシュします。しかし、2回目以降は問題なく動作します。

おそらく、 core/userconfig.rb において初期値が定義されていた設定について、参照すべき初期値がなくなったからと思われます。

この辺ですかね。

rest/rest.rb

Lines 6 to 9 in a4bcd03

def self.define_periodical_executer(api, interval, count, &success)
counter = UserConfig[interval]
lambda{ |service|
counter += 1

stacktrace

Traceback (most recent call last):
        15: from mikutter.rb:109:in `<main>'
        14: from mikutter.rb:73:in `boot!'
        13: from /home/shibafu/git/mikutter/core/plugin/gtk/mainloop.rb:10:in `mainloop'
        12: from /home/shibafu/git/mikutter/core/plugin/gtk/mainloop.rb:10:in `catch'
        11: from /home/shibafu/git/mikutter/core/plugin/gtk/mainloop.rb:12:in `block in mainloop'
        10: from /home/shibafu/git/mikutter/core/plugin/gtk/mainloop.rb:12:in `loop'
         9: from /home/shibafu/git/mikutter/core/plugin/gtk/mainloop.rb:23:in `block (2 levels) in mainloop'
         8: from /home/shibafu/git/mikutter/vendor/bundle/ruby/2.6.0/gems/delayer-1.0.1/lib/delayer.rb:36:in `method_missing'
         7: from /home/shibafu/git/mikutter/vendor/bundle/ruby/2.6.0/gems/delayer-1.0.1/lib/delayer/extend.rb:92:in `run_once'
         6: from /home/shibafu/git/mikutter/vendor/bundle/ruby/2.6.0/gems/delayer-1.0.1/lib/delayer/procedure.rb:26:in `run'
         5: from /home/shibafu/.mikutter/plugin/rest/rest.rb:34:in `block in start'
         4: from /home/shibafu/.mikutter/plugin/rest/rest.rb:34:in `each'
         3: from /home/shibafu/.mikutter/plugin/rest/rest.rb:35:in `block (2 levels) in start'
         2: from /home/shibafu/.mikutter/plugin/rest/rest.rb:35:in `each'
         1: from /home/shibafu/.mikutter/plugin/rest/rest.rb:35:in `block (3 levels) in start'
/home/shibafu/.mikutter/plugin/rest/rest.rb:9:in `block in define_periodical_executer': undefined method `+' for nil:NilClass (NoMethodError)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions