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

TypeConverter changes property #105

Closed
dnagir opened this issue Dec 14, 2011 · 1 comment
Closed

TypeConverter changes property #105

dnagir opened this issue Dec 14, 2011 · 1 comment
Labels
Milestone

Comments

@dnagir
Copy link
Contributor

dnagir commented Dec 14, 2011

http://neo4j.lighthouseapp.com/projects/15548/tickets/177-typeconverter-changes-property

Define a TypeConverter:

 module Neo4j::TypeConverters                                                                                                                               
   class HashConverter                                                                                                                                      
     class << self                   
       def convert?(type)                                                                                                                                   
         true
       end
       def to_java(val)                                                                                                                                     
         # Some string with special character                                                                                                              
         "/x81"                                                                                                                             
       end                                                                                                                                                  
       def to_ruby(val)                
         # Argument `val` is different than expected ("\xC2\x81")                                                                                                           
         raise val unless val == "/x81" 
         val                                                                                                                 
       end                                                                                                                                                  
     end                                                                                                                                                    
   end                                                                                                                                                      
 end
@dnagir
Copy link
Contributor Author

dnagir commented Jan 13, 2012

I can't really reproduce.
My guess is there was something to do with copy-pasting where the encoding did not match.

Closing it as can't repro anymore.

@dnagir dnagir closed this as completed Jan 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant