Skip to content

Instantly share code, notes, and snippets.

@Announcement
Created November 23, 2015 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Announcement/a8463151f9bccc86464a to your computer and use it in GitHub Desktop.
Save Announcement/a8463151f9bccc86464a to your computer and use it in GitHub Desktop.
def parent
server = :freenode
@http = 80
child #.call(self?) where self is scope
undesired(server, @http)
end
def child
puts server #should say freenode
puts @http #should say 80
end
def undesired(server, http) #passes arguments instead of a scope
puts server #says freenode
puts http #says 80
end
parent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment