neglectedvalue/sequel — comment on commit 52c5775175719d6c939df6d7191b3940be94f245
File:  line 0
By jeremyevans:

Ah. That makes sense for your use case, but I don't think this is a good general fix, since there are cases where subclasses have different behavior. If you don't want to keep a Sequel fork, you might be able to do something crazy like the following instead:

class Nori
def StringWithAttributes.==(klass)
super || klass == String
end
end

One thing I don't understand is that if you are assigning the value to a string column, Sequel should be calling to_s on the Nori::StringWithAttributes instance (value), which should return a String (v). Is the database column not a string (varchar/text)? Have you turned off typecasting?