Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OMIT_ON_ASSIGNMENT #129

Merged
merged 3 commits into from
Sep 13, 2020
Merged

Add OMIT_ON_ASSIGNMENT #129

merged 3 commits into from
Sep 13, 2020

Conversation

aycabta
Copy link
Member

@aycabta aycabta commented Sep 3, 2020

Omit the results evaluated at assignment if they are too long.

The behavior of ECHO_ON_ASSIGNMENT being on by default is hard to understand, so I change it to off by default. Instead, we turn OMIT_ON_ASSIGNMENT on by default. The result is displayed on assignment, but it will always be short and within one line of the screen.

ref. #12

Omit the results evaluated at assignment if they are too long.

The behavior of ECHO_ON_ASSIGNMENT being on by default is hard to understand,
so I change it to off by default. Instead, we turn OMIT_ON_ASSIGNMENT on by
default. The result is displayed on assignment, but it will always be short
and within one line of the screen.
@aycabta aycabta force-pushed the add-omit-on-assignment branch 2 times, most recently from d2c7e34 to c05bc9e Compare September 13, 2020 16:24
@aycabta aycabta merged commit 030ac44 into ruby:master Sep 13, 2020
@aycabta aycabta deleted the add-omit-on-assignment branch September 13, 2020 16:31
@onlynone
Copy link
Contributor

onlynone commented Sep 18, 2020

It might be confusing having the options ECHO, ECHO_ON_ASSIGNMENT, and OMIT_ON_ASSIGNMENT. Would it be simpler to let ECHO_ON_ASSIGNMENT be more than just a boolean? Maybe it could be false, true, or :truncate, and it would default to :truncate. That way we wouldn't need the extra option. Or it could be :never, :always, or :truncate if we don't want to mix types.

@aycabta
Copy link
Member Author

aycabta commented Sep 18, 2020

That’s exactly it! I created a new Pull Request #130.

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

Successfully merging this pull request may close these issues.

None yet

2 participants