dp 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/dp.gemspec +1 -1
- data/lib/dp.rb +1 -3
- data/spec/dp_spec.rb +6 -0
- data/spec/regular_methods.rb +6 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/dp.gemspec
CHANGED
data/lib/dp.rb
CHANGED
@@ -11,8 +11,6 @@ class Binding
|
|
11
11
|
#
|
12
12
|
# ==== Examples
|
13
13
|
#
|
14
|
-
# # Decrement the post_count column for the record with an id of 5
|
15
|
-
# DiscussionBoard.decrement_counter(:post_count, 5)
|
16
14
|
# def some_method
|
17
15
|
# name = 'Niclas'
|
18
16
|
# @age = 38
|
@@ -29,7 +27,7 @@ class Binding
|
|
29
27
|
variables = debug_str.split(',').map { |v| v.strip }
|
30
28
|
variables.each do |var|
|
31
29
|
result = Kernel.eval var, self
|
32
|
-
str += "#{separator}#{var}=#{result.inspect
|
30
|
+
str += "#{separator}#{var}=#{result.inspect}"
|
33
31
|
separator = ', '
|
34
32
|
end
|
35
33
|
puts str
|
data/spec/dp_spec.rb
CHANGED
@@ -11,5 +11,11 @@ describe "d.p" do
|
|
11
11
|
some_method
|
12
12
|
@stdout_string.string.should == 'name="Niclas", @age=38, team=["Niclas", "Johan", "Hans"]' + "\n"
|
13
13
|
end
|
14
|
+
|
15
|
+
it "should keep whitespace in result" do
|
16
|
+
whitespace_method
|
17
|
+
@stdout_string.string.should == 'whitespace_string=" foo "' + "\n"
|
18
|
+
end
|
19
|
+
|
14
20
|
end
|
15
21
|
|
data/spec/regular_methods.rb
CHANGED