This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 91464 - public, private and protected are not colored like keywords
Summary: public, private and protected are not colored like keywords
Status: VERIFIED INVALID
Alias: None
Product: ruby
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-22 10:55 UTC by Tomas Danek
Modified: 2007-07-03 14:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2006-12-22 10:55:26 UTC
#196:
i can see them bold black (i.e. they seem like method names)

My question is - are they keywords? I've googled and found different results on
different sources:

http://www.rubygarden.org/faq/entry/show/57?controller_prefix=faq%2F

here is private mentioned as keyword, but e.g. 

http://krijnhoetmer.nl/stuff/ruby/keywords/

says that public, private and protected are not a ruby keywords. So where's the
truth? 

p.s. Martine, you probably know....?!
Comment 1 Martin Krauskopf 2006-12-22 12:20:32 UTC
They are methods defined in the Module which is superclass of Class AFAIK.

====
  class Module
    alias original_private private
    def private
      # do nothing
    end
  end

  class B
    private
    def not_really_private
      puts "called"
    end
    original_private
    def really_private
      puts "never called"
    end
  end

  B.new.not_really_private
  B.new.really_private
====

So syntax coloring is ok, I think -> INVALID.
Comment 2 Torbjorn Norbye 2006-12-22 18:41:42 UTC
Correct, public/private/protected are not keywords. Neither is "include" which
surprised me - I originally thought that was a bug in my lexer. Ruby
accomplishes a lot using method calls.
Comment 3 Tomas Danek 2007-01-03 15:19:32 UTC
thanks for clarification. verified.
Comment 4 Jiri Kovalsky 2007-07-03 14:06:50 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 5 Jiri Kovalsky 2007-07-03 14:46:41 UTC
Changing target milestone of all resolved Ruby issues from TBD to 6.0 Beta 1 build.