irb
File.open and blocks in Ruby 1.8.7
I\'m pretty new to ruby and I\'m currently reading the Pickaxe book to get familiar with everything.I came across the File.open s开发者_Python百科ection where it discusses taking a block as a paramete[详细]
2023-03-23 14:58 分类:问答How to check if any of the Objects have the same data for the same field?
Is there a sweet irb line of code that could check is any of the Object\'s have the same data in their field?[详细]
2023-03-22 20:41 分类:问答Ruby / IRB: set instance variable to private or otherwise invisible?
In Ruby, when I do something like this: class Foo ... def initialize( var ) @var = var end ... end Then if I return a foo in console I get this object representation:[详细]
2023-03-21 08:45 分类:问答proc changing class in irb
Just when I thought I had my head wrapped around procs & lambdas this happens... irb> x = Proc.new{|name| \"Hello #{name}\"}[详细]
2023-03-21 00:40 分类:问答Using IRB (i.e. calling 'debugger') with Thor?
I\'m trying to get Thor to trigger an IRB prompt when \'debugger\' is reached in the code (like Rails, etc).Although I can trigger debugger, how do I get IRB to start automatically when debugger is tr[详细]
2023-03-19 06:30 分类:问答Ruby 1.9.2 and Rails 3.0 UTF-8 madness [duplicate]
This question already has answers here: Why does Rails 3 think xE2x80x89 means â x80 x89 (3 answers)[详细]
2023-03-19 03:33 分类:问答How do I make vi editing-mode work in IRB when using RVM?
I \"set editing-mode vi\" in my .inputrc on my Mac OS system, which allows vi editing in IRB. When I\'m using a RVM Ruby, the IRB sessions don\'t process this directive.[详细]
2023-03-18 06:39 分类:问答ruby irb on windows using gitbash shell - can't use arrow keys to modify command input?
when I do rails console my git bash shell permits me to use up arrow to recall comma开发者_StackOverflow中文版nds, and use left/right arrows to modify the text I\'m entering[详细]
2023-03-14 15:52 分类:问答Why the given expression takes so long in IRB
Any idea why the following simple expression lasts so long in IRB: irb(main):003:0> res=\'a\'*(10**6)[详细]
2023-03-14 01:47 分类:问答Rails -- is IRB necessary?
I am following Michael Hartl\'s RoR toturial and there are multiple places where he uses IRB, often to add users to the database.When I use rails console to open IRB and then create a User in the data[详细]
2023-03-14 01:46 分类:问答