Skip to content

Not working with crystal 0.30 #20

@renich

Description

@renich

The error is:

Error: abstract `def Enumerable(T)#each(&block)` must be implemented by Callback::ResultSet(T)

The code is one of your samples:

require "cli"
  
class Hello < Cli::Command
  class Options
    bool "--bye"
    arg "to"
  end

  def run
    if args.bye?
      print "Goodbye"
    else
      print "Hello"
    end
    puts " #{args.to}!"
  end
end

Hello.run %w(world) # prints "Hello, world!"
Hello.run %w(--bye world) # prints "Goodbye, world!"

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