Guest User

Untitled

a guest
Feb 9th, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. # Not working: (result: nil)
  2. map1 = {}
  3. map1[:flasko] = File.read '/tmp/myfile' # contains "hello"
  4. map1[:dadango] = "hello"
  5. Chef::Log.info(map1[:flasko].eql?(map1[:dadango]))
  6.  
  7. # Working: (result: true)
  8. map1 = {}
  9. map1[:flasko] = File.read '/tmp/myfile' # contains "hello"
  10. map1[:dadango] = "hello"
  11. Chef::Log.info(map1[:flasko].strip!.eql?(map1[:dadango]))
Advertisement
Add Comment
Please, Sign In to add comment