mirror of
				https://github.com/fog/fog.git
				synced 2022-11-09 13:51:43 -05:00 
			
		
		
		
	always use old encode/decode from multijson (it only has warnings in 1.3.0-1.3.2)
This commit is contained in:
		
							parent
							
								
									65db8fd4ab
								
							
						
					
					
						commit
						80f6042991
					
				
					 1 changed files with 4 additions and 16 deletions
				
			
		| 
						 | 
				
			
			@ -21,24 +21,12 @@ module Fog
 | 
			
		|||
    # Do the MultiJson introspection at this level so we can define our encode/decode methods and perform
 | 
			
		||||
    # the introspection only once rather than once per call.
 | 
			
		||||
 | 
			
		||||
    if MultiJson.respond_to?(:dump)
 | 
			
		||||
      def self.encode(obj)
 | 
			
		||||
        MultiJson.encode(obj)
 | 
			
		||||
      end
 | 
			
		||||
    else
 | 
			
		||||
      def self.encode(obj)
 | 
			
		||||
        MultiJson.encode(obj)
 | 
			
		||||
      end
 | 
			
		||||
    def self.encode(obj)
 | 
			
		||||
      MultiJson.encode(obj)
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    if MultiJson.respond_to?(:load)
 | 
			
		||||
      def self.decode(obj)
 | 
			
		||||
        MultiJson.decode(obj)
 | 
			
		||||
      end
 | 
			
		||||
    else
 | 
			
		||||
      def self.decode(obj)
 | 
			
		||||
        MultiJson.decode(obj)
 | 
			
		||||
      end
 | 
			
		||||
    def self.decode(obj)
 | 
			
		||||
      MultiJson.decode(obj)
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue