Simplify error.c #286

Merged
merged 3 commits into from Jun 15, 2012

Conversation

Projects
None yet
2 participants
@monaka
Contributor

monaka commented Jun 15, 2012

There are two patches.

One is two unused functions.
Other is not to use strlen().

There are related issues in mrb_warn/mrb_bug. But I left them. (I'll post later.)

@monaka

This comment has been minimized.

Show comment
Hide comment
@monaka

monaka Jun 15, 2012

Contributor

I added cfd5f51. This patch may arguable. This is required for conformance but not required just now as require() method is not implemented.

Contributor

monaka commented Jun 15, 2012

I added cfd5f51. This patch may arguable. This is required for conformance but not required just now as require() method is not implemented.

@matz

This comment has been minimized.

Show comment
Hide comment
@matz

matz Jun 15, 2012

Member

OK, but two notes:

(1) even though we don't use mrb_warning yet, it should be there for future use.
(2) We don't need LoadError in the core, since the core will not depend on I/O.

I will update later.

Member

matz commented Jun 15, 2012

OK, but two notes:

(1) even though we don't use mrb_warning yet, it should be there for future use.
(2) We don't need LoadError in the core, since the core will not depend on I/O.

I will update later.

matz added a commit that referenced this pull request Jun 15, 2012

@matz matz merged commit 79e1625 into mruby:master Jun 15, 2012

@matz

This comment has been minimized.

Show comment
Hide comment
@matz

matz Jun 15, 2012

Member

In CRuby, mrb_warn and mrb_warning has different level of warning (mrb_warning is weaker).

Member

matz commented Jun 15, 2012

In CRuby, mrb_warn and mrb_warning has different level of warning (mrb_warning is weaker).

@monaka

This comment has been minimized.

Show comment
Hide comment
@monaka

monaka Jun 15, 2012

Contributor

I see the reason why mrb_warning is needed. Thanks.

I think we need LoadError even if we don't support I/O.
It is not specified how the program is loaded on Kernel.require().
It's possible implementing require() without I/O. And probably some embeddians implement it so.
In case the core doesn't support Kernel.require() forever, I see your note (2) .

Contributor

monaka commented Jun 15, 2012

I see the reason why mrb_warning is needed. Thanks.

I think we need LoadError even if we don't support I/O.
It is not specified how the program is loaded on Kernel.require().
It's possible implementing require() without I/O. And probably some embeddians implement it so.
In case the core doesn't support Kernel.require() forever, I see your note (2) .

@matz

This comment has been minimized.

Show comment
Hide comment
@matz

matz Jun 15, 2012

Member

The core will not provide require method.
If someone want to define his own version of require, he can define LoadError as well.

Member

matz commented Jun 15, 2012

The core will not provide require method.
If someone want to define his own version of require, he can define LoadError as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment