ruby: Fix scope after anonymous classes
This commit is contained in:
parent
1ed29f1d7b
commit
17606d8af7
@ -49,6 +49,8 @@ static stringList* nesting = NULL;
|
||||
* FUNCTION DEFINITIONS
|
||||
*/
|
||||
|
||||
static void enterUnnamedScope (void);
|
||||
|
||||
/*
|
||||
* Returns a string describing the scope in 'list'.
|
||||
* We record the current scope as a list of entered scopes.
|
||||
@ -341,6 +343,7 @@ static void readAndEmitTag (const unsigned char** cp, rubyKind expected_kind)
|
||||
*
|
||||
* For now, we don't create any.
|
||||
*/
|
||||
enterUnnamedScope ();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -258,6 +258,7 @@ test_sources = \
|
||||
ruby-block-call.rb \
|
||||
ruby-doc.rb \
|
||||
ruby-namespaced-class.rb \
|
||||
ruby-scope-after-anonymous-class.rb \
|
||||
ruby-sf-bug-364.rb \
|
||||
rules.t2t \
|
||||
sample.t2t \
|
||||
|
10
tests/ctags/ruby-scope-after-anonymous-class.rb
Normal file
10
tests/ctags/ruby-scope-after-anonymous-class.rb
Normal file
@ -0,0 +1,10 @@
|
||||
class C
|
||||
class << self
|
||||
def foo() end
|
||||
end
|
||||
|
||||
def bar(); end
|
||||
end
|
||||
|
||||
puts C.foo
|
||||
puts C.new.bar
|
4
tests/ctags/ruby-scope-after-anonymous-class.rb.tags
Normal file
4
tests/ctags/ruby-scope-after-anonymous-class.rb.tags
Normal file
@ -0,0 +1,4 @@
|
||||
# format=tagmanager
|
||||
CÌ1Ö0
|
||||
barÌ128ÎCÖ0
|
||||
fooÌ128ÎCÖ0
|
Loading…
x
Reference in New Issue
Block a user