Skip to content

undefined method ljust in call to String#col extension method #200

Open

Description

@danchoi

Reported to me directly by @haby:

I conclude it is caused by a negative value for the width parameter to String#col lib/vmail/string_ext.rb. The log below shows the window width to be 31.

D, [2016-02-10T15:56:47.077406 #2611] DEBUG -- : Setting window width to 31
D, [2016-02-10T15:56:47.159503 #2611] DEBUG -- : #search: "all"
D, [2016-02-10T15:56:47.159606 #2611] DEBUG -- : Query: "769:868 all"
D, [2016-02-10T15:56:47.344956 #2611] DEBUG -- : - Query got 100 results; max seqno: 868
D, [2016-02-10T15:56:47.345044 #2611] DEBUG -- : Clearing cached message
D, [2016-02-10T15:56:47.345081 #2611] DEBUG -- : Fetching headers for 100 messages
D, [2016-02-10T15:56:48.063727 #2611] DEBUG -- : ERROR:
#<NoMethodError: undefined method `ljust' for nil:NilClass>
/Users/harryboer/.rvm/gems/ruby-1.9.3-p362/gems/vmail-2.9.5/lib/vmail/string_ext.rb:3:in `col'
/Users/harryboer/.rvm/gems/ruby-1.9.3-p362/gems/vmail-2.9.5/lib/vmail/showing_headers.rb:94:in `format_header_for_list'
/Users/harryboer/.rvm/gems/ruby-1.9.3-p362/gems/vmail-2.9.5/lib/vmail/showing_headers.rb:13:in `block in get_message_headers'
/Users/harryboer/.rvm/gems/ruby-1.9.3-p362/gems/vmail-2.9.5/lib/vmail/showing_headers.rb:13:in `map'
/Users/harryboer/.rvm/gems/ruby-1.9.3-p362/gems/vmail-2.9.5/lib/vmail/showing_headers.rb:13:in `get_message_headers'
/Users/harryboer/.rvm/gems/ruby-1.9.3-p362/gems/vmail-2.9.5/lib/vmail/searching.rb:43:in `search'

Fix pending.

Activity

  1. danchoi commented on Feb 16, 2016

    @danchoi
    OwnerAuthor

    @notalex Hi Alex, could you review this change and bump up the gem version when you're ready? Thank you.

  2. notalex commented on Feb 16, 2016

    @notalex
    Collaborator

    Sure. Will review in a few hours.

  3. danchoi commented on Feb 16, 2016

    @danchoi
    OwnerAuthor

    No rush.

  4. notalex commented on Feb 16, 2016

    @notalex
    Collaborator

    Version bumped and gem pushed. I believe this is related to the issue #199.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions