Skip to content

Commit 73ed8f3

Browse files
committed
Fix typo and add float creation to specs
1 parent 102089e commit 73ed8f3

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# e.g.:
2-
fixnum = 5
3-
bignum = 100_000_000_000_000_000_000
2+
fixnum = 5
3+
bignum = 100_000_000_000_000_000_000
4+
float = 8.25
45
rational = Rational(2, 7)
5-
complex = Complex(0.1, 2.5)
6+
complex = Complex(0.1, 2.5)

2_Numbers/1_The_different_types_of_numbers/solution_spec.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
[['solution::code']]
55

66
{
7-
fixnum: Fixnum,
8-
bignum: Bignum,
7+
fixnum: Fixnum,
8+
bignum: Bignum,
9+
float: Float,
910
rational: Rational,
10-
complex: Complex
11+
complex: Complex
1112
}.each do |variable, class_name|
1213
it "defines a variable with name \"#{variable}\"" do
1314
expect(local_variables.include?(variable)).to be true

2_Numbers/1_The_different_types_of_numbers/task.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ If you want to learn more, read about Fixnum and Bignum here:
4444
A *Float* represents an *inexact real number*.
4545
You can create a Float by declaring a number with a decimal place, like `3.0`
4646
or `-2_000.25`.
47+
4748
Another way to create a Float is to call `Float()` with a parameter, e.g.:
4849

4950
` Float(3)` *# => 3.0*
@@ -58,7 +59,7 @@ You can create a Rational by calling `Rational()` with one or two parameters, e.
5859

5960
` Rational(2)` *# => (2/1)*
6061
` Rational(2, 3)` *# => (2/3)*
61-
` Rarional('2/3')` *# => (2/3)*
62+
` Rational('2/3')` *# => (2/3)*
6263

6364
Read more about Rational here: (ruby-doc core: Rational).
6465

0 commit comments

Comments
 (0)