RubyString/ByteList Problems. Rails/Haml app broke as of r4585
--------------------------------------------------------------

                 Key: JRUBY-1573
                 URL: http://jira.codehaus.org/browse/JRUBY-1573
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.1b1, JRuby 1.0.2
            Reporter: Lenny Marks
            Assignee: Thomas E Enebo


I've narrowed this down more, although I still haven't isolated this outside of 
a Haml in Rails. The problem was introduced at revision 4585. Everything works 
fine up to r4584.  

<from mailing list>
I'm running into problems in my Jruby/Rails app when rendering a Haml page that 
uses form_helper_tag. This had been working as of Jruby trunk revision 4491. 
The Haml below works if I remove the form_tag. I also tried converting the same 
example to erb where it worked fine as well. Below are partial stack traces. 
Should I open a Jira for this with the full stack trace?

%p
  test
- form_tag :action => 'override_lock' do
  test

Exception in thread "Ruby Thread12438484" 
java.lang.StringIndexOutOfBoundsException: String index out of range: 259
        at java.lang.String.checkBounds(String.java:372)
        at java.lang.String.<init>(String.java:404)
        at org.jruby.util.ByteList.toString(ByteList.java:586)
        at org.jruby.util.ByteList.toString(ByteList.java:569)
        at org.jruby.RubyString.toString(RubyString.java:154)
        at org.jruby.RubyString.index(RubyString.java:1907)
        at org.jruby.RubyString.index(RubyString.java:1862)
        at org.jruby.RubyStringInvoker$index_method_1_1.call(Unknown Source)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:137)
        at 
org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:104)
        at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:562)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:209)
        at org.jruby.evaluator.ASTInterpreter.dAsgnNode(ASTInterpreter.java:760)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:229)
        at org.jruby.evaluator.ASTInterpreter.blockNode(ASTInterpreter.java:536)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:203)
        at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:166)
        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:175)
        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:140)
        at org.jruby.runtime.Block.yield(Block.java:111)
        at org.jruby.RubyString.each_line(RubyString.java:3265)
       ...
</from mailing list>

On a different page I noticed different symptoms such as missing output(see ex. 
below). 

- form_tag(:action => :new) do
  %table#accode_type_table
    %tr
      %th Accode:
      %td= text_field_tag :accode, nil, :size => 10
      ...

Produces

r4584
<form action="/outcorr/new" method="post">
  <table id='accode_type_table'>
    <tr>
      <th>Accode:</th>
      <td>
        <input id="accode" name="accode" size="10" type="text" />
      </td>
    </tr>

r4585
<form action="/outcorr/new" method="post">de:</th>
      <td>
        <input id="accode" name="accode" size="10" type="text" />
      </td>
    </tr>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to