10000 update Ruby 2 scanner test · rubychan/coderay-scanner-tests@f225ff9 · GitHub
[go: up one dir, main page]

Skip to content

Commit f225ff9

Browse files
committed
update Ruby 2 scanner test
1 parent 8184d70 commit f225ff9

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

ruby/ruby2.expected.raydebug

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,31 @@ ident(p) ident(x)operator(.)ident(method_name)
5959
ident(x) operator(=) constant(Baz)operator(.)ident(new)
6060
ident(p) ident(x)operator(.)ident(method_name)
6161

62+
comment(# Refinements)
63+
keyword(module) class(FloatDivision)
64+
ident(refine) constant(Fixnum) keyword(do)
65+
keyword(def) method(/)operator(()ident(other)operator(\))
66+
predefined_constant(self)operator(.)ident(to_f) operator(/) ident(other)
67+
keyword(end)
68+
keyword(end)
69+
keyword(end)
70+
71+
keyword(class) class(MathFun)
72+
ident(using) constant(FloatDivision)
73+
keyword(def) predefined_constant(self)operator(.)method(ratio)operator(()ident(a)operator(,) ident(b)operator(\))
74+
ident(a)operator(/)ident(b)
75+
keyword(end)
76+
keyword(end)
77+
78+
ident(p) constant(MathFun)operator(.)ident(ratio)operator(()integer(6)operator(,) integer(8)operator(\))
79+
6280
comment(# Misc)
6381
ident(p) predefined_constant(nil)operator(.)ident(to_h)
6482
ident(p) ident(Hash)operator(()operator([)operator(])operator(\))
6583

66-
ident(days) operator(=) operator(%)ident(i)operator({)ident(sun) ident(mon) ident(tue) ident(wed) ident(thu) ident(fri) ident(sat)operator(})
84+
ident(days) operator(=) symbol<delimiter(%i{)content(sun mon tue wed thu fri sat)delimiter(})>
6785
ident(p) ident(days)
68-
ident(p) operator(%)constant(I)operator({) comment(#{1*3} }, %w{jan feb mar})
86+
ident(p) symbol<delimiter(%I{)content( )inline<inline_delimiter(#{)integer(1)operator(*)integer(3)inline_delimiter(})>content( )delimiter(})>operator(,) string<delimiter(%w{)content(jan feb mar)delimiter(})>
6987

7088
ident(puts) ident(__dir__)
7189
ident(puts) constant(File)operator(.)ident(dirname)operator(()constant(File)operator(.)ident(realpath)operator(()predefined_constant(__FILE__)operator(\))operator(\))

0 commit comments

Comments
 (0)
0