dj2/Ruby-RTF — Issue #1: Incompatibility in the code. parse.rb:39
Author: marlesson
Created: 2012-03-09 00:14:43+00:00
State: open

I could not use the gem. After debugging the problem checked the the code below does not run as it should.

*lib/ruby-rtf/parse.rb: 39*

```ruby

while (current_pos < len)
char = src[current_pos]
current_pos += 1

case(char)
when '\\' then
name, val, current_pos = parse_control(src, current_pos)
current_pos = handle_control(name, val, src, current_pos)
```

I found that src [current_pos] returns an integer, so it never enters the case with the options to char.

After modifying the line 39 for "case (char.chr)" worked properly.

I use ruby 1.8.7 on Windows 7. Would be some incompatibility?