# Minimal class to reproduce issue JIRA-2418
# This fails with "protected method `protected_2' called for #<Issue2418:0xfa39bb> (NoMethodError)"
# in JRuby 1.1.1, works in MRI 1.8
# Author: steen.lehmann@jayway.dk
class Issue2418

  def unprotected
    protected_1('current')
  end
  
protected
  
  def protected_1(span_class)
    # Removing the line below makes the script work
    classnames = Array[*span_class]
    
    protected_2
  end

  def protected_2
    puts "works"
  end
  
end
  
Issue2418.new.unprotected

