diff --git a/.gitignore b/.gitignore index 3a0d8ae..3f2cb01 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.o *.bundle +Makefile diff --git a/rb_fraction.m b/rb_fraction.m index 167bb7a..f3410cf 100644 --- a/rb_fraction.m +++ b/rb_fraction.m @@ -50,12 +50,12 @@ void fraction_free(Fraction *fraction) { } VALUE fraction_allocate(VALUE klass) { - Fraction *fraction = [[Fraction alloc] init]; + frac = [[Fraction alloc] init]; - [fraction setDenominator:Qnil]; - [fraction setNumerator:Qnil]; + [frac setDenominator:Qnil]; + [frac setNumerator:Qnil]; - return Data_Wrap_Struct(klass, fraction_mark, fraction_free, fraction); + return Data_Wrap_Struct(klass, fraction_mark, fraction_free, frac); } VALUE fraction_initialize(VALUE self) {