Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #832 from topazproject/typo-fix
Fixed several typos
  • Loading branch information
alex committed Jul 25, 2014
2 parents 9fd5e51 + 7f0f4e7 commit 7dc713c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Expand Up @@ -4,7 +4,7 @@


def pytest_funcarg__space(request):
# Inside the function so various intitialization stuff isn't seen until
# Inside the function so various initialization stuff isn't seen until
# coverage is setup.
import topaz
from topaz.main import get_topaz_config_options
Expand Down
2 changes: 1 addition & 1 deletion tests/objects/test_fileobject.py
Expand Up @@ -69,7 +69,7 @@ def test_new_simple(self, space, tmpdir):
with self.raises(space, "ArgumentError", "invalid access mode ra"):
space.execute("File.new('%s', 'ra')" % f)
with self.raises(space, "Errno::ENOENT"):
space.execute("File.new('%s', 1)" % tmpdir.join("non-existant"))
space.execute("File.new('%s', 1)" % tmpdir.join("non-existent"))

w_res = space.execute("return File.new('%s%snonexist', 'w')" % (tmpdir.dirname, os.sep))
assert isinstance(w_res, W_FileObject)
Expand Down
2 changes: 1 addition & 1 deletion topaz.mspec
Expand Up @@ -48,7 +48,7 @@ class MSpecScript
"^#{Rubyspec}/language/predefined_spec.rb",
# AttributeError: 'File' object has no attribute 'compile_defined'
"^#{Rubyspec}/language/defined_spec.rb",
# no real reason found (results in a Aborted (core dumped))
# no real reason found (results in an Aborted (core dumped))
# AssertionError in Parser_combine_send_block ?
"^#{Rubyspec}/language/return_spec.rb",
# command_asgn_lhs_equal_command_asgn
Expand Down
2 changes: 1 addition & 1 deletion topaz/interpreter.py
Expand Up @@ -92,7 +92,7 @@ def handle_bytecode(self, space, pc, frame, bytecode):
def run_instr(self, space, name, num_args, bytecode, frame, pc):
args = ()
# Do not change these from * 256 to << 8, lshift has defined overflow
# semantics which cause it to not propogate the nonnegative-ness.
# semantics which cause it to not propagate the nonnegative-ness.
if num_args >= 1:
v = ord(bytecode.code[pc]) | (ord(bytecode.code[pc + 1]) * 256)
check_nonneg(v)
Expand Down
4 changes: 2 additions & 2 deletions topaz/objects/bignumobject.py
Expand Up @@ -182,7 +182,7 @@ def method_divmod(self, space, w_other):
space.is_kind_of(w_other, space.w_fixnum)):
other = space.bigint_w(w_other)
if not other.tobool():
raise space.error(space.w_ZeroDivisionError, "devided by 0")
raise space.error(space.w_ZeroDivisionError, "divided by 0")
div, mod = self.bigint.divmod(other)
return space.newarray([space.newbigint_fromrbigint(div),
space.newbigint_fromrbigint(mod)])
Expand Down Expand Up @@ -220,5 +220,5 @@ def method_mod(self, space, w_other):

def method_mod_bigint_impl(self, space, other):
if not other.tobool():
raise space.error(space.w_ZeroDivisionError, "devided by 0")
raise space.error(space.w_ZeroDivisionError, "divided by 0")
return space.newbigint_fromrbigint(self.bigint.mod(other))
2 changes: 1 addition & 1 deletion topaz/objects/floatobject.py
Expand Up @@ -340,7 +340,7 @@ def method_mod(self, space, w_other):

def method_mod_float_impl(self, space, other):
if other == 0.0:
raise space.error(space.w_ZeroDivisionError, "devided by 0")
raise space.error(space.w_ZeroDivisionError, "divided by 0")
elif self.floatvalue == -0.0:
return space.newfloat(-0.0)
elif math.isinf(other) and other < 0.0:
Expand Down
4 changes: 2 additions & 2 deletions topaz/objects/intobject.py
Expand Up @@ -230,7 +230,7 @@ def method_divmod(self, space, w_other):
if y == 0:
raise space.error(
space.w_ZeroDivisionError,
"devided by 0"
"divided by 0"
)
mod = space.int_w(self.method_mod_int_impl(space, y))
div = (self.intvalue - mod) / y
Expand Down Expand Up @@ -262,7 +262,7 @@ def method_mod(self, space, w_other):

def method_mod_int_impl(self, space, other):
if other == 0:
raise space.error(space.w_ZeroDivisionError, "devided by 0")
raise space.error(space.w_ZeroDivisionError, "divided by 0")
return space.newint(self.intvalue % other)

@classdef.method("<<", other="int")
Expand Down

0 comments on commit 7dc713c

Please sign in to comment.