SHARE
TWEET

Untitled

a guest Jan 20th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def foo
  2.   a = 90
  3.   a = 123
  4.   x = nil
  5.   x = -> { a = a + 1;p a; p x}
  6.   x.call
  7.   a = a + 32
  8.   x.call
  9.   x
  10. end
  11.  
  12. MTypeInf::inference_main {
  13.   x = foo
  14.   x.call
  15.   x.call
  16. }
  17.  
  18. #result
  19. #
  20. # 124
  21. # #<Proc:0x20053f80>
  22. # 156
  23. # #<Proc:0x20053f80>
  24. # 157
  25. # #<Proc:0x20053f80>
  26. # 158
  27. # #<Proc:0x20053f80>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top