A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://gist.github.com/4118156 below:

Problem splitting a file ยท GitHub

def self.process_tweet(reply, requestlink)  
   @requestlink = requestlink 
   qry = reply.downcase.split

using a breakpoint to inspect 'reply' in my code - but cannot figure out why it is not splitting?

[1] pry(GuideSearch)> p reply                                                                                        
 "@twellyme film"                                                                                                     
=> "@twellyme film"                                                                                                  
[2] pry(GuideSearch)> p reply.class                                                                                  
String                                                                                                               
=> String                                                                                                            
[3] pry(GuideSearch)> p reply.split                                                                                  
["@twellyme film"]                                                                                                   
=> ["@twellyme film"]

yet when i make reply 'by hand':

[4] pry(GuideSearch)> reply = "@twellyme film"                                                                       
=> "@twellyme film"                                                                                                  
[5] pry(GuideSearch)> p reply.split                                                                                  
["@twellyme", "film"]                                                                                                
=> ["@twellyme", "film"]



[5] pry(GuideSearch)> p reply                                                                                        
"@twellyme film"                                                                                                     
=> "@twellyme film"                                                                                                  
[6] pry(GuideSearch)> reply = reply.gsub(/[^[:print:]]/, ' ')                                                        
=> "@twellyme film"                                                                                                  
[8] pry(GuideSearch)> reply.split                                                                                    
=> ["@twellyme film"]                                                                                                
[9] pry(GuideSearch)> p reply.split                                                                                  
["@twellyme film"]                                                                                                   
=> ["@twellyme film"]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4