ruby / ruby/error_highlight

Doesn't highlight error for missing constant when const_missing is redefined for class

Open
#34 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
155
Forks
37
Avg merge
4d 2h
Merged PRs (30d)
1

Description

I'm working on new feature for ruby's test/unit tool and I define Test::Unit::TestCase.const_missing. It does some stuff then calls old const_missing like the following (pseudo code):

orig = self.method(:const_missing)
def const_missing(name)
  # do some stuff 
   orig.call(name)
end

This broke error_highlight tests for missing constant, it wasn't highlighting anymore. I'm not sure if this is fixable or not.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the missing-constant error with a class-level const_missing override as shown in the issue, then run the error_highlight test suite to identify the affected missing-constant test. Done means error highlighting still appears when const_missing is redefined and delegates to the original method.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.