mack_ruby_core_extensions 0.0.4 → 0.0.5

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.
@@ -124,10 +124,10 @@
124
124
  onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
125
125
  <div class="method-source-code" id="M000019-source">
126
126
  <pre>
127
- <span class="ruby-comment cmt"># File lib/extensions/float.rb, line 2</span>
128
- 2: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prec</span>(<span class="ruby-identifier">x</span>)
129
- 3: <span class="ruby-identifier">sprintf</span>(<span class="ruby-node">&quot;%01.#{x}f&quot;</span>, <span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">to_f</span>
130
- 4: <span class="ruby-keyword kw">end</span>
127
+ <span class="ruby-comment cmt"># File lib/extensions/float.rb, line 3</span>
128
+ 3: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prec</span>(<span class="ruby-identifier">x</span>)
129
+ 4: <span class="ruby-identifier">sprintf</span>(<span class="ruby-node">&quot;%01.#{x}f&quot;</span>, <span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">to_f</span>
130
+ 5: <span class="ruby-keyword kw">end</span>
131
131
  </pre>
132
132
  </div>
133
133
  </div>
data/doc/created.rid CHANGED
@@ -1 +1 @@
1
- Tue, 25 Mar 2008 17:55:07 -0400
1
+ Tue, 25 Mar 2008 17:57:35 -0400
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Fri Mar 14 12:40:30 -0400 2008</td>
59
+ <td>Tue Mar 25 17:56:02 -0400 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Mar 25 16:33:31 -0400 2008</td>
59
+ <td>Tue Mar 25 17:56:57 -0400 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -1,5 +1,7 @@
1
1
  class Float
2
+
2
3
  def prec(x)
3
4
  sprintf("%01.#{x}f", self).to_f
4
5
  end
6
+
5
7
  end
@@ -2,6 +2,6 @@
2
2
  require "utils/#{k}"
3
3
  end
4
4
 
5
- [:array, :class, :dir, :float, :hash, :kernel, :logger, :math, :method_not_implemented, :module, :nil, :object, :string, :symbol].each do |k|
5
+ [:array, :class, :float, :hash, :kernel, :logger, :math, :method_not_implemented, :module, :nil, :object, :string, :symbol].each do |k|
6
6
  require "extensions/#{k}"
7
7
  end
@@ -2,14 +2,8 @@ require File.dirname(__FILE__) + '/../test_helper.rb'
2
2
 
3
3
  class FloatTest < Test::Unit::TestCase
4
4
 
5
- def setup
5
+ def test_prec
6
+ assert_equal 1.1, 1.1234.prec(1)
6
7
  end
7
8
 
8
- def teardown
9
- end
10
-
11
- # replace this with tests of your own.
12
- def test_truth
13
- assert true
14
- end
15
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mack_ruby_core_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates