DebugClients/Ruby/Completer.rb

changeset 808
8f85926125ef
parent 791
9ec2ac20e54e
child 1509
c0b5e693b0eb
equal deleted inserted replaced
805:83ca4d1ff648 808:8f85926125ef
133 133
134 when /^(\$[^.]*)$/ 134 when /^(\$[^.]*)$/
135 # Global variable 135 # Global variable
136 candidates = global_variables.grep(Regexp.new(Regexp.quote($1))) 136 candidates = global_variables.grep(Regexp.new(Regexp.quote($1)))
137 137
138 # when /^(\$?(\.?[^.]+)+)\.([^.]*)$/ 138 ## when /^(\$?(\.?[^.]+)+)\.([^.]*)$/
139 when /^((\.?[^.]+)+)\.([^.]*)$/ 139 when /^((\.?[^.]+)+)\.([^.]*)$/
140 # variable 140 # variable
141 receiver = $1 141 receiver = $1
142 message = Regexp.quote($3) 142 message = Regexp.quote($3)
143 143
177 candidates = String.instance_methods(true) 177 candidates = String.instance_methods(true)
178 select_message(receiver, message, candidates) 178 select_message(receiver, message, candidates)
179 179
180 else 180 else
181 candidates = eval("methods | private_methods | local_variables | self.class.constants", @binding) 181 candidates = eval("methods | private_methods | local_variables | self.class.constants", @binding)
182 182
183 (candidates|ReservedWords).grep(/^#{Regexp.quote(input)}/) 183 (candidates|ReservedWords).grep(/^#{Regexp.quote(input)}/)
184 end 184 end
185 end 185 end
186 186
187 Operators = ["%", "&", "*", "**", "+", "-", "/", 187 Operators = ["%", "&", "*", "**", "+", "-", "/",

eric ide

mercurial