Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails on this code #4

Open
rdp opened this issue Oct 8, 2009 · 1 comment
Open

fails on this code #4

rdp opened this issue Oct 8, 2009 · 1 comment

Comments

@rdp
Copy link
Owner

rdp commented Oct 8, 2009

  def focus_word(focus_segment)
    focus_world = ''
    char = focus_segment[-1..-1]
  while [")","]","}"].include?(char)
    char=focus_segment[-2..-2]
    focus_segment = focus_segment[0..-2]
  end
  j = focus_segment.length - 1
  while !["\s","\t",";",",","(","[","{",">"].include?(char) && j >= 0
    focus_world = "#{char}#{focus_world}"
    j=j-1
    char = focus_segment[j..j]
  end
  focus_world
end
@rdp
Copy link
Owner Author

rdp commented Oct 8, 2009

presumably because of the extra ('s in there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant