phw / ruby-discid

Ruby bindings for MusicBrainz libdiscid
GNU Lesser General Public License v3.0
3 stars 0 forks source link

Example in "Read the TOC, MCN and ISRCs" does not work #18

Closed thomasregnet closed 3 years ago

thomasregnet commented 3 years ago

I get this error:

/home/ossi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/discid-1.4.0/lib/discid/disc.rb:205:in `new': tried to create Proc object without a block (ArgumentError)
        from /home/ossi/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/discid-1.4.0/lib/discid/disc.rb:205:in `tracks'
        from ./discid.rb:15:in `<main>'

Using disc.tracks.each do |track| would fix this issue.

phw commented 3 years ago

That's probably a Ruby 3 issue. As of now this library is untested on Ruby 3. I'll check what needs to be done to support Ruby 3.

phw commented 3 years ago

Should be fixed with d620f9a, also setup CI with Ruby 3. Would be great if you could check whether this fix works for you as well. I'll do a new gem release later this week.

phw commented 3 years ago

I published a new version 1.4.1 with the fix for this

thomasregnet commented 3 years ago

Works :).

Thanks