Posts by Mari • 157 points
4 posts
-
1
votes1
answer86
viewsQ: How to test a Singleton class in Ruby?
I’m using require "Singleton" to make a certain class only be instantiated once. However, when running rspec tests, I get the following error: Nomethoderror: private method `new' called for…
-
7
votes1
answer9290
viewsQ: How do I remove a staging area file in git?
I accidentally added all the files to the staging area of git with the "git add." , how to remove a file from staging area so it is not commited?
-
4
votes1
answer188
viewsQ: How to recover the number of commits made by a person?
What is the Git command to recover the number of commits made by a particular programmer?
-
3
votes2
answers294
viewsA: Curiosity about equality of Integers
This is because the Integer Class uses the Flyweight design pattern. The Integer class creates an immutable Singleton object for each of the numbers from -128 to 127 so that these objects can be…