Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- str.gsub!(/#{str1}/){"#{updates}"}
- str[str1] = updates
- >> s = 'Where is X house?'
- => "Where is X house?"
- >> s['X'] = 'pancakes'
- => "pancakes"
- >> s
- => "Where is pancakes house?"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement