Skip to content

yield_handler_spec.rb test fails with recent ruby3.3.0dev #1514

@mtasaka

Description

@mtasaka

Testing yard head ( 2d197a3 ), with ruby 3.3.0dev spec test fails like below.

So exactly ruby/ruby@b5e23d3 is making yard testsuite fail.
I don't know in detail what yard or the above ruby commit does, however it looks like the above ruby commit rejects some of yield usage.

$ rspec -rspec_helper spec

Failures:

  1) YARD::Handlers::Ruby::YieldHandler only parses yield blocks in methods
     Failure/Error: raise ProxyMethodError, "Proxy cannot call method ##{meth} on object '#{path}'"
     
     YARD::CodeObjects::ProxyMethodError:
       Proxy cannot call method #tag on object 'Testing'
     # ./lib/yard/code_objects/proxy.rb:194:in `rescue in method_missing'
     # ./lib/yard/code_objects/proxy.rb:191:in `method_missing'
     # ./spec/handlers/yield_handler_spec.rb:8:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:129:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `tag' for an instance of YARD::CodeObjects::Proxy
     #   ./lib/yard/code_objects/proxy.rb:192:in `method_missing'

  2) YARD::Handlers::Ruby::YieldHandler handles an empty yield statement
     Failure/Error: raise ProxyMethodError, "Proxy cannot call method ##{meth} on object '#{path}'"
     
     YARD::CodeObjects::ProxyMethodError:
       Proxy cannot call method #tag on object 'Testing#mymethod'
     # ./lib/yard/code_objects/proxy.rb:194:in `rescue in method_missing'
     # ./lib/yard/code_objects/proxy.rb:191:in `method_missing'
     # ./spec/handlers/yield_handler_spec.rb:13:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:129:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `tag' for an instance of YARD::CodeObjects::Proxy
     #   ./lib/yard/code_objects/proxy.rb:192:in `method_missing'

  3) YARD::Handlers::Ruby::YieldHandler does not document a yield statement in a method with either @yield or @yieldparam
     Failure/Error: raise ProxyMethodError, "Proxy cannot call method ##{meth} on object '#{path}'"
     
     YARD::CodeObjects::ProxyMethodError:
       Proxy cannot call method #tag on object 'Testing#mymethod2'
     # ./lib/yard/code_objects/proxy.rb:194:in `rescue in method_missing'
     # ./lib/yard/code_objects/proxy.rb:191:in `method_missing'
     # ./spec/handlers/yield_handler_spec.rb:18:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:129:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `tag' for an instance of YARD::CodeObjects::Proxy
     #   ./lib/yard/code_objects/proxy.rb:192:in `method_missing'

  4) YARD::Handlers::Ruby::YieldHandler handles any arbitrary yield statement
     Failure/Error: raise ProxyMethodError, "Proxy cannot call method ##{meth} on object '#{path}'"
     
     YARD::CodeObjects::ProxyMethodError:
       Proxy cannot call method #tag on object 'Testing#mymethod5'
     # ./lib/yard/code_objects/proxy.rb:194:in `rescue in method_missing'
     # ./lib/yard/code_objects/proxy.rb:191:in `method_missing'
     # ./spec/handlers/yield_handler_spec.rb:30:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:129:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `tag' for an instance of YARD::CodeObjects::Proxy
     #   ./lib/yard/code_objects/proxy.rb:192:in `method_missing'

  5) YARD::Handlers::Ruby::YieldHandler handles parentheses
     Failure/Error: raise ProxyMethodError, "Proxy cannot call method ##{meth} on object '#{path}'"
     
     YARD::CodeObjects::ProxyMethodError:
       Proxy cannot call method #tag on object 'Testing#mymethod6'
     # ./lib/yard/code_objects/proxy.rb:194:in `rescue in method_missing'
     # ./lib/yard/code_objects/proxy.rb:191:in `method_missing'
     # ./spec/handlers/yield_handler_spec.rb:34:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:129:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `tag' for an instance of YARD::CodeObjects::Proxy
     #   ./lib/yard/code_objects/proxy.rb:192:in `method_missing'

  6) YARD::Handlers::Ruby::YieldHandler only documents the first yield statement in a method (limitation of yield handler)
     Failure/Error: raise ProxyMethodError, "Proxy cannot call method ##{meth} on object '#{path}'"
     
     YARD::CodeObjects::ProxyMethodError:
       Proxy cannot call method #tag on object 'Testing#mymethod7'
     # ./lib/yard/code_objects/proxy.rb:194:in `rescue in method_missing'
     # ./lib/yard/code_objects/proxy.rb:191:in `method_missing'
     # ./spec/handlers/yield_handler_spec.rb:38:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:129:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `tag' for an instance of YARD::CodeObjects::Proxy
     #   ./lib/yard/code_objects/proxy.rb:192:in `method_missing'

  7) YARD::Handlers::Ruby::YieldHandler handles `self` keyword and list object type as yieldparam for _self
     Failure/Error: raise ProxyMethodError, "Proxy cannot call method ##{meth} on object '#{path}'"
     
     YARD::CodeObjects::ProxyMethodError:
       Proxy cannot call method #tag on object 'Testing#mymethod8'
     # ./lib/yard/code_objects/proxy.rb:194:in `rescue in method_missing'
     # ./lib/yard/code_objects/proxy.rb:191:in `method_missing'
     # ./spec/handlers/yield_handler_spec.rb:42:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:129:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `tag' for an instance of YARD::CodeObjects::Proxy
     #   ./lib/yard/code_objects/proxy.rb:192:in `method_missing'

  8) YARD::Handlers::Ruby::YieldHandler handles `super` keyword and document it under _super
     Failure/Error: raise ProxyMethodError, "Proxy cannot call method ##{meth} on object '#{path}'"
     
     YARD::CodeObjects::ProxyMethodError:
       Proxy cannot call method #tag on object 'Testing#mymethod9'
     # ./lib/yard/code_objects/proxy.rb:194:in `rescue in method_missing'
     # ./lib/yard/code_objects/proxy.rb:191:in `method_missing'
     # ./spec/handlers/yield_handler_spec.rb:48:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:129:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `tag' for an instance of YARD::CodeObjects::Proxy
     #   ./lib/yard/code_objects/proxy.rb:192:in `method_missing'

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