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

LoadError in 1.9, generator.rb gone #1

Open
philomory opened this issue Mar 25, 2010 · 1 comment
Open

LoadError in 1.9, generator.rb gone #1

philomory opened this issue Mar 25, 2010 · 1 comment

Comments

@philomory
Copy link

generator.rb has been removed from Ruby 1.9, so when trying to use sortable under 1.9, it fails with a LoadError. sortable.rb isn't really making much use of Generator's features, though, so the patch to fix the issue is pretty simple.

0a1,2
> require 'generator'
> 
211c213,214
<           search_array.each_with_index do |col,i|

---
>           g = Generator.new(search_array)
>           g.each do |col|
213c216
<            columns_to_search += 'OR ' unless i == search_array.length - 1

---
>            columns_to_search += 'OR ' unless g.end?
259c262,263
<           sort_array.each_with_index do |sort_value,i|

---
>           g = Generator.new(sort_array)
>           g.each do |sort_value|
261c265
<             result += ', ' unless i == sort_array.length - 1

---
>             result += ', ' unless g.end?
@kovacs
Copy link
Owner

kovacs commented Mar 16, 2011

Hey sorry I haven't been monitoring this.. I'll go ahead and apply this patch.. appreciate it

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

2 participants