On 11 May 2018 at 14:58, Sam Ruby <[email protected]> wrote:
> On Fri, May 11, 2018 at 9:05 AM, Shane Curcuru <[email protected]> wrote:
>> Macbook:tools curcuru$ ruby ./site-scan.rb sites.json pods.json
>>
>> ~/src/whimsy/lib/whimsy/asf/committee.rb:428:in `pmcs': undefined method
>> `-' for nil:NilClass (NoMethodError)
>>         from ./site-scan.rb:198:in `<main>'
>>
>> Help?  Is this related to the issue with the whimsy asf gem wrong
>> version / not using things from source / wrong path or whatever sebb and
>> rubys have been investigating?
>>
>> Macbook:tools curcuru$ irb
>>
>> irb(main):001:0> require_relative "../lib/whimsy/asf"
>> => true
>> irb(main):002:0> x = ASF::Committee.load_committee_info
>> => nil
>
> For me, I get an array:
>
> irb(main):002:0> x = ASF::Committee.load_committee_info.length
> => 201
>
> Looking at the source to load_committee_info, I see:
>
>         board = ASF::SVN.find('board')
>         return unless board
>         file = File.join(board, 'committee-info.txt')
>         return unless File.exist? file
>
> What does ASF::SVN.find('board') return for you?

Should load_committee_info throw rather than returning nil?

Is there any use case where nil is OK as a return?

> - Sam Ruby

Reply via email to